mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
misc: finalized KMIP icon
This commit is contained in:
1
frontend/public/lotties/key-user.json
Normal file
1
frontend/public/lotties/key-user.json
Normal file
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
|||||||
import { ComponentPropsWithRef, ElementType, ReactNode, Ref, useRef } from "react";
|
import { ComponentPropsWithRef, ElementType, ReactNode, Ref, useRef } from "react";
|
||||||
import { DotLottie, DotLottieReact } from "@lottiefiles/dotlottie-react";
|
import { DotLottie, DotLottieReact, Mode } from "@lottiefiles/dotlottie-react";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
export type MenuProps = {
|
export type MenuProps = {
|
||||||
@@ -16,6 +16,7 @@ export type MenuItemProps<T extends ElementType> = {
|
|||||||
as?: T;
|
as?: T;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
iconMode?: Mode;
|
||||||
description?: ReactNode;
|
description?: ReactNode;
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
isSelected?: boolean;
|
isSelected?: boolean;
|
||||||
@@ -26,6 +27,7 @@ export type MenuItemProps<T extends ElementType> = {
|
|||||||
export const MenuItem = <T extends ElementType = "button">({
|
export const MenuItem = <T extends ElementType = "button">({
|
||||||
children,
|
children,
|
||||||
icon,
|
icon,
|
||||||
|
iconMode,
|
||||||
className,
|
className,
|
||||||
isDisabled,
|
isDisabled,
|
||||||
isSelected,
|
isSelected,
|
||||||
@@ -62,6 +64,7 @@ export const MenuItem = <T extends ElementType = "button">({
|
|||||||
dotLottieRefCallback={(el) => {
|
dotLottieRefCallback={(el) => {
|
||||||
iconRef.current = el;
|
iconRef.current = el;
|
||||||
}}
|
}}
|
||||||
|
mode={iconMode}
|
||||||
src={`/lotties/${icon}.json`}
|
src={`/lotties/${icon}.json`}
|
||||||
loop
|
loop
|
||||||
className="h-full w-full"
|
className="h-full w-full"
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export const ProjectLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem isSelected={isActive} icon="lock-closed">
|
<MenuItem isSelected={isActive} icon="key-user" iconMode="reverse">
|
||||||
KMIP
|
KMIP
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user