-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified summary component to handle household summary and simplified…
… CSS (#346)
- Loading branch information
Showing
14 changed files
with
326 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,40 @@ | ||
| Name | Type | Required | Description | | ||
| --------- | ---------------------- | -------- | --------------------------------------- | | ||
| questions | Array<SummaryQuestion> | true | An array of questions to summarise | | ||
| title | string | false | The title for the summary block | | ||
| classes | string | false | Classes to add to the summary component | | ||
|
||
## SummaryItem | ||
| Name | Type | Required | Description | | ||
| ------------ | -------------------- | -------- | --------------------------------------- | | ||
| answers | Array<SummaryAnswer> | true | An array of answers for this question | | ||
| title | string | false | The title for the question | | ||
| error | boolean | false | Whether to render this item as an error | | ||
| errorMessage | string | false | Error message for the question | | ||
| total | boolean | false | Whether to render this item as a total | | ||
|
||
## SummaryAnswer | ||
|
||
| Name | Type | Required | Description | | ||
| ------ | ------------------- | -------- | -------------------------------------------------------------------------------- | | ||
| title | string | false | Label for the question | | ||
| values | Array<SummaryValue> | true | The answer(s) to the question | | ||
| action | SummaryAction | false | Configuration for the answer edit button. If not specified no button will render | | ||
| Name | Type | Required | Description | | ||
| ------- | ----------------- | -------- | --------------------------------------- | | ||
| rows | Array<SummaryRow> | true | An array of rows to summarise | | ||
| title | string | false | The title for the summary block | | ||
| classes | string | false | Classes to add to the summary component | | ||
|
||
## SummaryRow | ||
|
||
| Name | Type | Required | Description | | ||
| ------------ | --------------------- | -------- | --------------------------------------- | | ||
| rowItems | Array<SummaryRowItem> | true | An array of items for this row | | ||
| title | string | false | The title for the row | | ||
| error | boolean | false | Whether to render this item as an error | | ||
| errorMessage | string | false | Error message for the row | | ||
| total | boolean | false | Whether to render this item as a total | | ||
|
||
## SummaryRowItem | ||
|
||
| Name | Type | Required | Description | | ||
| ------- | -------------------- | -------- | ---------------------------------------------------------------------- | | ||
| icon | string | false | Name of the icon to be placed next to the title | | ||
| title | string | false | Label for the row item | | ||
| values | Array<SummaryValue> | false | The value(s) to the row item | | ||
| actions | Array<SummaryAction> | false | Configurations for action links. If not specified no links will render | | ||
|
||
## SummaryValue | ||
|
||
| Name | Type | Required | Description | | ||
| ----- | ------ | -------- | -------------------------------------------------------------- | | ||
| text | string | true | The display value for the answer value | | ||
| text | string | true | The display value | | ||
| other | string | false | The display value for the "other" input on a checkbox or radio | | ||
|
||
## SummaryAction | ||
|
||
| Name | Type | Required | Description | | ||
| ---------- | ------ | -------- | ----------------------------------------------------------------------------------------- | | ||
| text | string | true | Text for the action button | | ||
| url | string | true | URL to edit the answer | | ||
| ariaLabel | string | false | An aria-label to apply to the button if you need it to be more verbose for screen readers | | ||
| attributes | object | false | HTML attributes (for example data attributes) to add to the action link | | ||
| Name | Type | Required | Description | | ||
| ---------- | ------ | -------- | --------------------------------------------------------------------------------------- | | ||
| text | string | true | Text for the action link | | ||
| url | string | true | URL to edit the answer | | ||
| ariaLabel | string | false | An aria-label to apply to the link if you need it to be more verbose for screen readers | | ||
| attributes | object | false | HTML attributes (for example data attributes) to add to the action link | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.