# Component Button Button library based on bootstrap classes ![Buttons img](../assets/buttons.png) ## Usage | Property | Type | Required | Description | | -------- | ---- | -------- | ----------- | | `children`| node | no | Ex: `` | | `className` | any | no | Sets a custom className. Ex: `` | | `secondary`| bool | no | [Bootstrap className](https://v4-alpha.getbootstrap.com/components/buttons/) | | `secondaryHotline` | bool | no | Sets className | | `secondaryHotlineAdd` | bool | no | Inserts fontAwesone plus icon inside the button. Ex: `` | | `type` | string | no | Sets the button type | ## Example **Path —** `./plugins/my-plugin/admin/src/translations/en.json`. ```json { "myPlugin.button.label": "Add a new" } ``` **Path —** `./plugins/my-plugin/admin/src/components/Foo/index.js`. ```js import Button from 'components/Button'; const Foo = () => { // Define your buttons const buttons = [ { label: 'myPlugin.button.label', labelValues: { foo: 'Bar', }, kind: 'primaryAddShape', onClick: () => console.log('Click'), }, ]; return (
{buttons.map((buttonProps) =>
); } // Will display a primaryAddShape button with label: 'Add a new Bar' export default Button; ```