From fb1dd7ccb0ec63c970c845a28d8e98514ada0fc3 Mon Sep 17 00:00:00 2001 From: Jani Kraner Date: Wed, 6 Jun 2018 16:12:44 +0100 Subject: [PATCH] Update button table of arguments --- src/components/button/README.md | 20 ++++---------------- src/components/button/index.njk | 24 +++++------------------- 2 files changed, 9 insertions(+), 35 deletions(-) diff --git a/src/components/button/README.md b/src/components/button/README.md index ef638d404d..2760ec5089 100644 --- a/src/components/button/README.md +++ b/src/components/button/README.md @@ -190,7 +190,7 @@ If you are using Nunjucks,then macros take the following arguments string -Yes +No Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`. @@ -198,25 +198,13 @@ If you are using Nunjucks,then macros take the following arguments -text - -string - -Yes - -Text for the button - - - - - -html +text (or) html string Yes -HTML for the button or link. If this is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`. +Text or HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`. @@ -300,7 +288,7 @@ If you are using Nunjucks,then macros take the following arguments No -Any extra HTML attributes (for example data attributes) to add to the error message span tag +Any extra HTML attributes (for example data attributes) to add to the button component. diff --git a/src/components/button/index.njk b/src/components/button/index.njk index 22e3c86765..77852d527f 100644 --- a/src/components/button/index.njk +++ b/src/components/button/index.njk @@ -51,7 +51,7 @@ Buttons are configured to perform an action and they can have a different look. text: 'string' }, { - text: 'Yes' + text: 'No' }, { text: 'Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`.' @@ -59,30 +59,16 @@ Buttons are configured to perform an action and they can have a different look. ], [ { - text: 'text' + text: 'text (or) html' }, { text: 'string' }, { - text: 'Yes' - }, - { - text: 'Text for the button' - } - ], - [ - { - text: 'html' - }, - { - text: 'string' - }, - { - text: 'Yes' + text:'Yes' }, { - text: 'HTML for the button or link. If this is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`.' + text: 'Text or HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`.' } ], [ @@ -180,7 +166,7 @@ Buttons are configured to perform an action and they can have a different look. text: 'No' }, { - text: 'Any extra HTML attributes (for example data attributes) to add to the error message span tag' + text: 'Any extra HTML attributes (for example data attributes) to add to the button component.' } ] ]