Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@govuk-react/hint-text

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-react/hint-text - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

14

es/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc