0.0.1 • Published 5 years ago

@publicismedia-ds/ui-button v0.0.1

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
5 years ago

Button

The Button component renders a stylized button and supports multiple rendering options and states

Install

npm install @publicismedia-ds/ui-button

Usage

import React from "react";
import Button from "@publicismedia-ds/ui-button";

class App extends React.Component {
	render() {
		return (
			<Button type="primary" onClick={() => alert("SUBMIT")}>
				Submit
			</Button>
		);
	}
}

Props

The following props are parsed out and any other props get passed-through

  • type | String | Default: primary | Accepts "primary" : "secondary" : "text"
  • small | Boolean | Default: false | Makes button small
  • invert | Boolean | Default: false | Flips color scheme to render on a dark background
  • as | String | Default: button | Render element as specified tag
  • href | String | Default: null | Implicitly renders as <a> and sets href (no need to explicitly specify "as")
0.0.1

5 years ago