1.0.2 • Published 8 months ago

df-button v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

df-button - Get started

Custom button react component built with tailwindcss.

Install

Add Button to your project.

npm install --save df-button

* added styles.css to your application *

import 'df-button/styles.css'

Use

Button

import Button from 'df-button';

  const example = () => (
    <div>
       <Button style="primary">Button Label</Button>
    </div>
  )

Props

type Props = React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>

&
PropValues
buttonStyle'primary', 'success', 'error', 'borderless'
size'sm', 'md', 'lg'
isOutlinetrue, false
isPendingtrue, false
disabledtrue, false
classNametailwind classes -> string format

Button Group

import Button from 'df-button';

  const example = () => (
    <ButtonGroup>
       <Button style="primary">Button Label</Button>
       <Button style="primary">Button Label</Button>
       <Button style="primary">Button Label</Button>
    </ButtonGroup>
  )

Props

PropValues
buttonsHasSameWidthtrue, false

Override styles

You can easily override any style of component just adding a custom tailwind class inside element's className property. For that, it's required to have tailwindcss as a dependency and setup on the project.

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.4.0

9 months ago

0.3.0

9 months ago

0.2.0

9 months ago

0.1.0

9 months ago