@govuk-react/hidden-text
v0.5.1
Published
Renders a styled details element along with summary from prop and children rendered as contents.
Downloads
43
Keywords
Readme
HiddenText
Import
import HiddenText from '@govuk-react/hidden-text';
Usage
Simple
import Paragraph from '@govuk-react/paragraph';
<HiddenText summaryText={'Help with nationality'}>
<Paragraph mb={0}>I am a paragraph. Please read me.</Paragraph>
</HiddenText>
References
- https://govuk-elements.herokuapp.com/typography/#typography-hidden-text
- https://github.com/alphagov/govuk-frontend/blob/master/src/components/details/_details.scss
Properties
Prop | Required | Default | Type | Description
:--- | :------- | :------ | :--- | :----------
children
| | undefined
| node | The nodes that will be displayed within the InsetText component
summaryText
| true | `````` | string | Text for the summary button link e.g. Help with nationality