npm.io
1.0.18 • Published 7 years ago

@crpt/react-button

Licence
MIT
Version
1.0.18
Deps
3
Size
82 kB
Vulns
0
Weekly
0

Button

Travis npm package Coveralls

Button component.

Usage


import { Button, SIZES, themes } from  "@crpt/react-button";


<Button onClick={e => console.log('clicked!')} size={SIZES.normal} />
PropName Описание Пример
onClick: Function Callback for click event. <Button onClick={e => console.log('clicked!')} />
theme: Object Theme object, can be found in themes directory. <Button theme={themes.filledTheme} />
disabled: Boolean Disables the button. <Button disabled />
size: String Button size, all sizes can be found SIZES. <Button size={SIZES.large} />
link: Boolean If true, the button becomes a link with href and target attributes. <Button link href="https://google.com/" target="_blank" />