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"; 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, ButtonPrimaryFull, ButtonSecondary, ButtonSecondaryFull, ButtonDisabled, ButtonDisabledFull, } from 'slate-react-system';`}

Regular width

There are three variations of the regular width 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

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

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 ) } }`}
); } }