Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

@gov.au/tags

3.1.4 • Public • Published

@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 AUtags from './tags.js';
 
<AUtags tags={[
  {
    link: 'link/to/tag1',
    text: 'tag1',
  },
  {
    link: 'link/to/tag2',
    text: 'tag2',
  },
  {
    link: 'link/to/tag3',
    text: 'tag3',
    li: {
      className: 'li-wrapping-class',
    },
  },
]} />

All props:

<AUtags
  dark={ false }           {/* A dark variation of the component */}
  linkComponent="a"       {/* The component used for the link, optional */}
  tags={[
    {
      link: 'url/to/tag',  {/* The href link of this tag, optional */}
      linkComponent: 'a',  {/* The component used for the link, optional */}
      text: 'tagname',     {/* The text of the tag */}
      li: {},              {/* An object that will be spread onto the <li> tag, optional */}
    },
  ]},
/>

(💡 additional props are spread onto the component)

For more details have a look at the usage example.

⬆ back to top


Dependency graph

tags
└─ core

⬆ back to top


Tests

The visual test: https://uikit.service.gov.au/packages/tags/tests/site/

⬆ back to top


Release History

  • v3.1.4 - Update dependencies
  • v3.1.3 - Removing web pack dev server, updating dependencies
  • v3.1.2 - Fixed build scripts for Windows
  • v3.1.1 - Replace node-sass with sass
  • v3.1.0 - React router support
  • v3.0.0 - Remove support for Description List
    for accessibility, Update dependencies
  • v2.0.2 - Change homepage links
  • v2.0.1 - Fix dependencies
  • v2.0.0 - Change to focus colour and border/muted color mix
  • v1.0.0 - Moved to AU namespace, added new color themes and spacing
  • 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

};

install

npm i @gov.au/tags

Downloadsweekly downloads

214

version

3.1.4

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability