node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

@gov.au/tags

@gov.au/tags

Use tags to apply a taxonomy and link to similar content.

Contents


Install

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

⬆ back to top


Usage

⬆ back to top


React

Usage:

import Button from './tags.js';
 
<Tags tags={[
    {
        link: 'link/to/tag1',
        text: 'tag1',
    },
    {
        link: 'link/to/tag2',
        text: 'tag2',
    },
    {
        link: 'link/to/tag3',
        text: 'tag3',
    },
]} />

All props:

<Tags
    tags={[
        {
            link: 'url/to/tag',  {/* The href link of this tag, optional */}
            text: 'tagname',     {/* The text of the tag */}
            onClick: () => {},   {/* A function to execute when the tag is clicked, optional */}
        },
    ]}
/>

For more details have a look at the usage example.

⬆ back to top


Dependency graph

tags
└─ core

⬆ back to top


Build

⬆ back to top


Tests

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

⬆ back to top


Release History

  • v0.3.0 - Added pancake-react plugin, ES5 main file
  • v0.2.0 - Added react component
  • v0.1.1 - Fixed a11y contrast issue
  • v0.1.0 - 💥 Initial version

⬆ back to top


License

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

⬆ back to top

};