0.1.0 • Published 1 year ago
@urban-ui/button-extras v0.1.0
@urban-ui/button-extras
control | button-extras
Additional button examples. These extend the default button package to cover more use-cases. They can be used as examples of extending the button package or as standalone button types.
## Getting started
pnpm add -S @urban-ui/button-addons
Work button
import {ReloadIcon} from '@radix-ui/react-icons'
import {Box} from '@urban-ui/box
import {WorkButton} from '@urban-ui/button-extras'
export function MyComponent() {
return (
<WorkButton
isWorking={true}
icon={<Box size={15}><ReloadIcon /></Box>}
onClick={() => {}}
>
Working
</LoadiWorkButtonngButton>
)
}
Prop | Type | Description |
---|---|---|
isWorking | boolean | Controls whether the icon is visible |
icon | React.ReactNode | icon to render |
...props | Button props | Urban-ui button props |