@govuk-react/hint-text
Advanced tools
Comparing version 0.8.0 to 0.9.0
@@ -1,2 +0,2 @@ | ||
// https://github.com/alphagov/govuk-frontend/tree/master/src/components/ | ||
// https://github.com/alphagov/govuk-frontend/tree/main/src/govuk/components/ | ||
import styled from 'styled-components'; | ||
@@ -27,8 +27,16 @@ import React from 'react'; | ||
* Simple | ||
* | ||
* ```jsx | ||
* <HintText>Example</HintText> | ||
* import { Label, LabelText, HintText, ErrorText, Input } from 'govuk-react' | ||
* | ||
* <Label> | ||
* <LabelText>Example label</LabelText> | ||
* <HintText>Example hint</HintText> | ||
* <ErrorText>Example error</ErrorText> | ||
* <Input value={value} onClick={onClick} /> | ||
* </Label> | ||
* ``` | ||
* | ||
* ### References | ||
* - https://github.com/alphagov/govuk-frontend/blob/master/src/components/hint/_hint.scss | ||
* - https://github.com/alphagov/govuk-frontend/blob/main/src/govuk/components/hint/_hint.scss | ||
*/ | ||
@@ -35,0 +43,0 @@ |
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withDocsCustom } from '@govuk-react/storybook-components'; | ||
import HintText from '.'; | ||
import ReadMe from '../README.md'; | ||
var stories = storiesOf('Typography/HintText', module); | ||
stories.addDecorator(withDocsCustom(ReadMe)); | ||
stories.add('Component default', function () { | ||
export default { | ||
title: 'Form/Hint text', | ||
component: HintText | ||
}; | ||
export var Default = function Default() { | ||
return /*#__PURE__*/React.createElement(HintText, null, "Example"); | ||
}); | ||
}; | ||
//# sourceMappingURL=stories.js.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// https://github.com/alphagov/govuk-frontend/tree/master/src/components/ | ||
// https://github.com/alphagov/govuk-frontend/tree/main/src/govuk/components/ | ||
var StyledHint = (0, _styledComponents["default"])('span').withConfig({ | ||
@@ -41,8 +41,16 @@ displayName: "src__StyledHint", | ||
* Simple | ||
* | ||
* ```jsx | ||
* <HintText>Example</HintText> | ||
* import { Label, LabelText, HintText, ErrorText, Input } from 'govuk-react' | ||
* | ||
* <Label> | ||
* <LabelText>Example label</LabelText> | ||
* <HintText>Example hint</HintText> | ||
* <ErrorText>Example error</ErrorText> | ||
* <Input value={value} onClick={onClick} /> | ||
* </Label> | ||
* ``` | ||
* | ||
* ### References | ||
* - https://github.com/alphagov/govuk-frontend/blob/master/src/components/hint/_hint.scss | ||
* - https://github.com/alphagov/govuk-frontend/blob/main/src/govuk/components/hint/_hint.scss | ||
*/ | ||
@@ -49,0 +57,0 @@ |
"use strict"; | ||
exports.__esModule = true; | ||
exports.Default = exports["default"] = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _react2 = require("@storybook/react"); | ||
var _storybookComponents = require("@govuk-react/storybook-components"); | ||
var _ = _interopRequireDefault(require(".")); | ||
var _README = _interopRequireDefault(require("../README.md")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var stories = (0, _react2.storiesOf)('Typography/HintText', module); | ||
stories.addDecorator((0, _storybookComponents.withDocsCustom)(_README["default"])); | ||
stories.add('Component default', function () { | ||
var _default = { | ||
title: 'Form/Hint text', | ||
component: _["default"] | ||
}; | ||
exports["default"] = _default; | ||
var Default = function Default() { | ||
return /*#__PURE__*/_react["default"].createElement(_["default"], null, "Example"); | ||
}); | ||
}; | ||
exports.Default = Default; | ||
//# sourceMappingURL=stories.js.map |
{ | ||
"name": "@govuk-react/hint-text", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"dependencies": { | ||
"@govuk-react/constants": "^0.8.0", | ||
"@govuk-react/lib": "^0.8.0", | ||
"@govuk-react/constants": "^0.9.0", | ||
"@govuk-react/lib": "^0.9.0", | ||
"govuk-colours": "^1.1.0" | ||
@@ -23,3 +23,3 @@ }, | ||
"license": "MIT", | ||
"homepage": "https://github.com/govuk-react/govuk-react/tree/master/components/hint-text", | ||
"homepage": "https://github.com/govuk-react/govuk-react/tree/main/components/hint-text", | ||
"description": "Renders a styled span element with children provided.", | ||
@@ -26,0 +26,0 @@ "private": false, |
@@ -14,8 +14,16 @@ HintText | ||
Simple | ||
```jsx | ||
<HintText>Example</HintText> | ||
import { Label, LabelText, HintText, ErrorText, Input } from 'govuk-react' | ||
<Label> | ||
<LabelText>Example label</LabelText> | ||
<HintText>Example hint</HintText> | ||
<ErrorText>Example error</ErrorText> | ||
<Input value={value} onClick={onClick} /> | ||
</Label> | ||
``` | ||
### References | ||
- https://github.com/alphagov/govuk-frontend/blob/master/src/components/hint/_hint.scss | ||
- https://github.com/alphagov/govuk-frontend/blob/main/src/govuk/components/hint/_hint.scss | ||
@@ -22,0 +30,0 @@ ### Properties |
@@ -1,2 +0,2 @@ | ||
// https://github.com/alphagov/govuk-frontend/tree/master/src/components/ | ||
// https://github.com/alphagov/govuk-frontend/tree/main/src/govuk/components/ | ||
@@ -30,10 +30,18 @@ import styled from 'styled-components'; | ||
* Simple | ||
* | ||
* ```jsx | ||
* <HintText>Example</HintText> | ||
* import { Label, LabelText, HintText, ErrorText, Input } from 'govuk-react' | ||
* | ||
* <Label> | ||
* <LabelText>Example label</LabelText> | ||
* <HintText>Example hint</HintText> | ||
* <ErrorText>Example error</ErrorText> | ||
* <Input value={value} onClick={onClick} /> | ||
* </Label> | ||
* ``` | ||
* | ||
* ### References | ||
* - https://github.com/alphagov/govuk-frontend/blob/master/src/components/hint/_hint.scss | ||
* - https://github.com/alphagov/govuk-frontend/blob/main/src/govuk/components/hint/_hint.scss | ||
*/ | ||
const HintText = props => <StyledHint {...props} />; | ||
const HintText = (props) => <StyledHint {...props} />; | ||
@@ -40,0 +48,0 @@ HintText.propTypes = { |
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withDocsCustom } from '@govuk-react/storybook-components'; | ||
import HintText from '.'; | ||
import ReadMe from '../README.md'; | ||
const stories = storiesOf('Typography/HintText', module); | ||
stories.addDecorator(withDocsCustom(ReadMe)); | ||
export default { | ||
title: 'Form/Hint text', | ||
component: HintText, | ||
}; | ||
stories.add('Component default', () => <HintText>Example</HintText>); | ||
export const Default = () => <HintText>Example</HintText>; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17829
218
35
+ Added@govuk-react/constants@0.9.1(transitive)
+ Added@govuk-react/lib@0.9.1(transitive)
+ Addednanoid@3.3.8(transitive)
- Removed@govuk-react/constants@0.8.0(transitive)
- Removed@govuk-react/lib@0.8.0(transitive)
- Removednanoid@3.3.7(transitive)
Updated@govuk-react/lib@^0.9.0