Keyword list
v4.0.0The keyword list style helps to emphasise and draw the user's eye to phrases that are repeated in a list.
Released
- History
- View changes
- Install
- npm i @gold.au/keyword-list
- Tags
- Requires
- Contributors
React Usage
import AUkeywordList from '@gold.au/keyword-list';
<AUkeywordList
repeatedName='Department of'
items={[
{
link: 'http://www.agriculture.gov.au/',
name: 'Agriculture and Water Resources',
},
{
link: 'https://www.communications.gov.au/',
name: 'Communications and the Arts',
li: {
className: 'li-wrapping-class',
},
},
{
link: 'https://www.finance.gov.au/',
name: 'Finance',
},
]}
/>
Props
Prop name | Type | Description |
---|---|---|
repeatedName | string | Provide the aria label |
items | object | The text That is repeated in each item |
linkComponent | string | The component used for the child links, optional |
items[0].link | string | The link of this item |
items[0].name | string | The name of the item |
items[0].li | object | An object that will be spread onto the <li> tag, optional |
items[0].linkComponent | string | The component used for the link, optional |
dark | boolean | A dark variation of the component |
All other props are spread into the component
Exports
Name | Type | Description |
---|---|---|
AUkeywordList |
default | The keyword list component |
node_modules import
import AUkeywordList from '@gold.au/keyword-list';
pancake import
import AUkeywordList from './keyword-list';