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

@gov.au/link-list

@gov.au/link-list

A simple list of inline links..

Contents


Install

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

⬆ back to top


Usage

⬆ back to top


React

Usage:

import LinkList from './link-list.js';
 
<LinkList items={[
    {
        link: 'link/one/',
        text: 'Link 1',
    },
    {
        link: 'link/two/',
        text: 'Link 2',
    },
    {
        link: 'link/three/',
        text: 'Link 3',
    },
]} />

All props:

<LinkList
    inverted={ false }        {/* The inverted option for theming, optional */}
    inline={ false }          {/* The inline option to make the list inline, optional */}
    items={[                  {/* All links in a neat array */}
        {
            link: 'link/to/',     {/* The link for this item, optional */}
            text: 'Link title',   {/* The text for this item */}
            onClick={ () => {} }  {/* A function to execute when this link is clicked, optional */}
        },
    ]},
/>

For more details have a look at the usage example.

⬆ back to top


Dependency graph

link-list
├─ core
└─ body
   └─ core

⬆ back to top


Build

⬆ back to top


Tests

The visual test: http://uikit.apps.staging.digital.gov.au/packages/link-list/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.0 - 💥 Initial version

⬆ back to top


License

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

⬆ back to top

};