joyent-portal/packages/ui-toolkit/src/button
johnytiago 078513f603 feat(instances): adds cli-details UI 2018-06-04 14:30:07 +01:00
..
__tests___ feat(instances): adds cli-details UI 2018-06-04 14:30:07 +01:00
Readme.md docs(ui-toolkit): add parallax 2018-04-05 14:29:22 +01:00
Special.md docs(ui-toolkit): add parallax 2018-04-05 14:29:22 +01:00
group.js feat(instances): bug fixes #1387 2018-05-17 18:14:00 +01:00
index.js feat(templates): bootstrap 2018-06-04 11:46:08 +01:00
popover.js feat(ui-toolkit): remove all margins 2018-05-08 15:32:10 +01:00

Readme.md

Primary Button

Primary button to be used once per page. Only use to indicate main action per pattern. Min. width: 120px

// Name: Active
const React = require('react');
const { default: Button } = require('./');

<span>
  <Button>Inspire the lazy</Button>
</span>;

// Tab: Disabled
const React = require('react');
const { default: Button } = require('./');
<span>
  <Button disabled>Inspire the brave</Button>
</span>;

Secondary Button

Secondary buttons can be used freely to indicate other actions on patterns. Min. width: 120px

// Name: Active
const React = require('react');
const { default: Button } = require('./');

<span>
  <Button secondary>Inspire the brave</Button>
</span>;

// Tab: Disabled
const React = require('react');
const { default: Button } = require('./');
<span>
  <Button secondary disabled>
    Inspire the brave
  </Button>
</span>;

Loading Button

const React = require('react');
const { default: Button } = require('./');

<span>
  <Button secondary loading>
    Inspire the liars
  </Button>
</span>;

Quick Action

Quick action buttons can be embedded in components to give additional functionality. They can be used in either primary or secondary color palettes, depending on importance.

// Name: Active
const React = require('react');
const { default: Button } = require('./');
const { Actions } = require('../icons');
<span>
  <Button secondary icon actions>
    <Actions />
  </Button>
</span>;

// Tab: Disabled
const React = require('react');
const { default: Button } = require('./');
const { Actions } = require('../icons');
<span>
  <Button secondary icon actions disabled>
    <Actions />
  </Button>
</span>;

Primary

Primary anchor is a type of a link that sits outside the body text.

const React = require('react');
const Anchor = require('../text').Anchor;

<Anchor href="https://joyent.com">Inspire the lazy</Anchor>;

Disabled

Disabled anchors cannot be actioned and the cursor is disabled.

const React = require('react');
const Anchor = require('../text').Anchor;

<Anchor disabled href="https://joyent.com">
  Inspire the lazy disabled
</Anchor>;