Skip to content

Commit

Permalink
Update button table of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jani Kraner committed Jun 6, 2018
1 parent 715ec95 commit fb1dd7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 35 deletions.
20 changes: 4 additions & 16 deletions src/components/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,33 +190,21 @@ If you are using Nunjucks,then macros take the following arguments

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">Yes</td>
<td class="govuk-table__cell ">No</td>

<td class="govuk-table__cell ">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`.</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">text</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">Yes</td>

<td class="govuk-table__cell ">Text for the button</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">html</th>
<th class="govuk-table__header" scope="row">text (or) html</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">Yes</td>

<td class="govuk-table__cell ">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`.</td>
<td class="govuk-table__cell ">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`.</td>

</tr>

Expand Down Expand Up @@ -300,7 +288,7 @@ If you are using Nunjucks,then macros take the following arguments

<td class="govuk-table__cell ">No</td>

<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the error message span tag</td>
<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the button component.</td>

</tr>

Expand Down
24 changes: 5 additions & 19 deletions src/components/button/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -51,38 +51,24 @@ 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`.'
}
],
[
{
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`.'
}
],
[
Expand Down Expand Up @@ -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.'
}
]
]
Expand Down

0 comments on commit fb1dd7c

Please sign in to comment.