website refactor
This commit is contained in:
@@ -6,7 +6,7 @@ export interface IconProps extends Omit<BoxProps<'div'>, 'children'> {
|
||||
icon: LucideIcon | React.ReactNode;
|
||||
size?: 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 10 | 12 | 16 | 'full' | number;
|
||||
intent?: 'primary' | 'telemetry' | 'warning' | 'success' | 'critical' | 'high' | 'med' | 'low';
|
||||
animate?: 'spin' | 'none';
|
||||
animate?: 'spin' | 'pulse' | 'none';
|
||||
}
|
||||
|
||||
export function Icon({
|
||||
@@ -58,6 +58,8 @@ export function Icon({
|
||||
return IconProp;
|
||||
};
|
||||
|
||||
const animationClass = animate === 'spin' ? 'animate-spin' : (animate === 'pulse' ? 'animate-pulse' : '');
|
||||
|
||||
return (
|
||||
<Box
|
||||
display="inline-flex"
|
||||
@@ -66,7 +68,7 @@ export function Icon({
|
||||
style={style}
|
||||
{...props}
|
||||
>
|
||||
<div className={animate === 'spin' ? 'animate-spin w-full h-full flex items-center justify-center' : 'w-full h-full flex items-center justify-center'}>
|
||||
<div className={`${animationClass} w-full h-full flex items-center justify-center`}>
|
||||
{renderIcon()}
|
||||
</div>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user