mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 23:46:19 +00:00
23 lines
687 B
TypeScript
23 lines
687 B
TypeScript
import { DetailedHTMLProps, forwardRef, HTMLAttributes, PropsWithChildren } from 'react';
|
|
import { classNames } from '../../layout';
|
|
|
|
export const ToolbarItemView = forwardRef<HTMLDivElement, PropsWithChildren<{
|
|
icon: string;
|
|
}> & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>>((props, ref) =>
|
|
{
|
|
const { icon = null, className = null, ...rest } = props;
|
|
|
|
return (
|
|
<div
|
|
ref={ ref }
|
|
className={ classNames(
|
|
'cursor-pointer relative',
|
|
`nitro-icon icon-${ icon }`,
|
|
className
|
|
) }
|
|
{ ...rest } />
|
|
);
|
|
});
|
|
|
|
ToolbarItemView.displayName = 'ToolbarItemView';
|