1.0.0 • Published 3 years ago

atombuttons v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

atombuttons

Atom Buttons Example

Features

  • Easy to use
  • Different States
    • Primary
    • Secondary
    • Danger
    • Ghost
    • Disabled
  • Material Icon Buttons supported
    • Icon only button
    • Icon with text
    • Left and Right aligned buttons
  • Override styles with your own

Installation

npm install atombuttons --save

API

Import and Use

Add Material Icons CDN

For using the icon feature, you must include Material Design Icons.

<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
import AtomButton from "atombuttons";

Props

NameTypeDefaultDescription
sizeenum["sm", "md", "lg"]"md"Defines the size of button
stateenum["primary","secondary","ghost","danger"]"primary"The color scheme of button. Defaults to primary
disabledbooleanfalseif true, disables the button
iconMaterial Icon NamenullIcons can be picked up from here -> https://fonts.google.com/icons
iconAlignmentenum["left", "right"]"left"Aligns the chosen icon to left or right
childrenHTML elementnullif specified, it's wrapped in a tag
roundedbooleanfalseMakes the buttons rounded
roundEdgebooleanfalseMakes the buttons slightly round edged
tooltipstringnullIt adds a tooltip around the button
overrideStylescss object{}applies the object to style{{}} property

License

Licensed under the MIT License.