mirror of
https://github.com/hanzoai/icons.git
synced 2026-09-24 16:59:52 +00:00
31 lines
750 B
TypeScript
31 lines
750 B
TypeScript
'use client';
|
|
|
|
import { memo } from 'react';
|
|
|
|
import IconCombine, { type IconCombineProps } from '@/features/IconCombine';
|
|
|
|
import { COMBINE_SPACE_MULTIPLE, COMBINE_TEXT_MULTIPLE, TITLE } from '../style';
|
|
import Color from './Color';
|
|
import Mono from './Mono';
|
|
import Text from './Text';
|
|
|
|
export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
|
|
type?: 'color' | 'mono';
|
|
}
|
|
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
|
|
const Icon = type === 'color' ? Color : Mono;
|
|
|
|
return (
|
|
<IconCombine
|
|
Icon={Icon}
|
|
Text={Text}
|
|
aria-label={TITLE}
|
|
spaceMultiple={COMBINE_SPACE_MULTIPLE}
|
|
textMultiple={COMBINE_TEXT_MULTIPLE}
|
|
{...rest}
|
|
/>
|
|
);
|
|
});
|
|
|
|
export default Combine;
|