feat(components/system): implement Button
This commit is contained in:
parent
1272b00014
commit
2771e7b4cc
17
src/components/layout/Button/Button.tsx
Normal file
17
src/components/layout/Button/Button.tsx
Normal 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>
|
||||
)
|
||||
}
|
1
src/components/layout/Button/index.ts
Normal file
1
src/components/layout/Button/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './Button'
|
Loading…
Reference in New Issue
Block a user