import * as React from "react"; import * as System from "~/components/system"; import SystemPage from "~/components/system/SystemPage"; import ViewSourceLink from "~/components/system/ViewSourceLink"; import CodeBlock from "~/components/system/CodeBlock"; import Group from "~/components/system/Group"; export default class SystemPageButtons extends React.Component { render() { return ( Buttons

The Button component is used to trigger an action or event, such as submitting a form or saving users information.


Imports

Import React and the Button Components.

{`import * as React from "react"; import { ButtonPrimary, ButtonSecondary, ButtonDisabled, } from "slate-react-system";`}

Regular width

There are three variations of the button component.
Primary, Secondary and Disabled.

Primary   Secondary   Disabled

{`class ExamplePrimary extends React.Component { render() { return Primary Button; } } class ExampleSecondary extends React.Component { render() { return Secondary Button; } } class ExampleDisabled extends React.Component { render() { return Disabled Button; } }`}


Full width

Each of the button styles has a full width option.
Primary button full
Secondary button full
Disabled button full

{`class ExamplePrimaryFull extends React.Component { render() { return Primary button full; } } class ExampleSecondaryFull extends React.Component { render() { return Secondary button full; } } class ExampleDisabledFull extends React.Component { render() { return Disabled button full; } }`}


Labels

You can add the type='label' property to convert any of the above buttons into a label.
Primary label {" "}   Secondary label {" "}   Disabled label

{`class ExamplePrimaryLabel extends React.Component { render() { return Primary Button Label; } } class ExampleSecondaryLabel extends React.Component { render() { return ( Secondary Button Label ); } } class ExampleDisabledLabel extends React.Component { render() { return Disabled Button Label; } }`}


Accepted React Properties

); } }