Files
Nitro-V3/src/components/toolbar/ToolbarItemView.tsx
T
DuckieTM 7feb10ab15 🆙 Init V3
2026-01-31 09:10:52 +01:00

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';