node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

@gov.au/buttons

@gov.au/buttons

Buttons signal action. Use them to move the user through the service.

Contents


Install

yarn add @gov.au/buttons
npm install @gov.au/buttons --save-dev

⬆ back to top


Usage

⬆ back to top


React

Usage:

import Button from './buttons.js';
 
<Button text="Continue" />

All props:

<Button
    text="Submitting"     {/* The text of the button */}
    as=""                 {/* The kind of button, 'secondary','tertiary', optional */}
    block={ true }        {/* The block option to make the button fill the available width, optional */}
    type="submit"         {/* The type attribute, optional */}
    onClick={ () => {} }  {/* A function to execute when the button is clicked, optional */}
/>

For more details have a look at the usage example.

⬆ back to top


Dependency graph

buttons
└─ core

⬆ back to top


Build

⬆ back to top


Tests

The visual test: http://uikit.apps.staging.digital.gov.au/packages/buttons/tests/site/

⬆ back to top


Release History

  • v0.5.0 - Added pancake-react plugin, ES5 main file
  • v0.4.0 - Added react component
  • v0.3.0 - Fixed px height, added more robust CSS code
  • v0.2.0 - Added block modifier
  • v0.1.0 - 💥 Initial version

⬆ back to top


License

Copyright (c) Commonwealth of Australia. Licensed under MIT.

⬆ back to top

};