diff --git a/src/components/ActionIcon.tsx b/src/components/ActionIcon.tsx new file mode 100644 index 0000000..e521762 --- /dev/null +++ b/src/components/ActionIcon.tsx @@ -0,0 +1,24 @@ +import { Icon, IconifyIconProps } from '@iconify-icon/solid'; +import cx from 'clsx'; +import { Component, JSX } from 'solid-js'; + +interface ActionIconProps { + icon: IconifyIconProps['icon']; + onClick?: () => void; + class?: JSX.HTMLAttributes['class']; +} + +const ActionIcon: Component = (props) => { + const handleClick: JSX.EventHandler = (e) => { + e.stopPropagation(); + props.onClick?.(); + }; + + return ( + + ); +}; + +export default ActionIcon;