npx github-download-directory carllosnc/react-thekit src/components/Button
import { Button } from '@/components'
<Button />
extends React.ButtonHTMLAttributes<HTMLButtonElement>
, then you can use all props and event of <button>
npm install react-icons
import { Button } from '@/components'
import { MdStar, MdHeadset } from 'react-icons/md'
function App() {
return (
<div>
<div className="flex gap-4">
<Button leftIcon={<MdStar />}>Button</Button>
<Button rightIcon={<MdHeadset />}>Button</Button>
<Button leftIcon={<MdStar />} rightIcon={<MdHeadset />}>
Button
</Button>
</div>
<div className="flex gap-4">
<Button isLoading="Carregando...">Button</Button>
<Button isLoading="Loading...">Button</Button>
</div>
</div>
)
}
name | type | default | description |
---|---|---|---|
children | string | undefined | button label |
isloading | string | false | loading mode |
leftIcon | ReactIcon | undefined | icon at left |
rightIcon | ReactIcon | undefined | icon at right |