feat(components/system): implement Button

This commit is contained in:
Walid 2023-04-23 20:13:57 +01:00
parent 1272b00014
commit 2771e7b4cc
Signed by: Walidoux
GPG Key ID: CCF21881FE8BEBAF
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,17 @@
import classNames from 'classnames'
interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
icon: JSX.Element
value: string
className?: string
handler?: () => void
}
export const Button: React.FC<ButtonProps> = ({ icon, value, className, handler }) => {
return (
<button onClick={handler} className={classNames(className, 'flex items-center justify-center gap-x-5')}>
{icon}
<span className='uppercase'>{value}</span>
</button>
)
}

View File

@ -0,0 +1 @@
export * from './Button'