@govuk-react/hint-text
Advanced tools
Comparing version 0.1.25 to 0.1.26
var _glamorous$span; | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
// https://github.com/alphagov/govuk-frontend/tree/master/src/components/ | ||
import glamorous from 'glamorous'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import * as COLOUR from 'govuk-colours'; | ||
@@ -23,7 +26,13 @@ import { FONT_SIZE, MEDIA_QUERIES, NTA_LIGHT } from '@govuk-react/constants'; | ||
var HintText = function HintText(props) { | ||
return React.createElement(GHintText, props); | ||
var HintText = function HintText(_ref) { | ||
var children = _ref.children, | ||
props = _objectWithoutProperties(_ref, ["children"]); | ||
return React.createElement(GHintText, props, children); | ||
}; | ||
HintText.propTypes = process.env.NODE_ENV !== "production" ? { | ||
children: PropTypes.node.isRequired | ||
} : {}; | ||
export default HintText; | ||
//# sourceMappingURL=index.js.map |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var COLOUR = _interopRequireWildcard(require("govuk-colours")); | ||
@@ -21,2 +23,4 @@ | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
var GHintText = _glamorous.default.span((_glamorous$span = { | ||
@@ -37,6 +41,12 @@ display: 'block', | ||
var HintText = function HintText(props) { | ||
return _react.default.createElement(GHintText, props); | ||
var HintText = function HintText(_ref) { | ||
var children = _ref.children, | ||
props = _objectWithoutProperties(_ref, ["children"]); | ||
return _react.default.createElement(GHintText, props, children); | ||
}; | ||
HintText.propTypes = process.env.NODE_ENV !== "production" ? { | ||
children: _propTypes.default.node.isRequired | ||
} : {}; | ||
var _default = HintText; | ||
@@ -43,0 +53,0 @@ exports.default = _default; |
{ | ||
"name": "@govuk-react/hint-text", | ||
"version": "0.1.25", | ||
"version": "0.1.26", | ||
"dependencies": { | ||
"@govuk-react/constants": "^0.1.21", | ||
"@govuk-react/constants": "^0.1.26", | ||
"govuk-colours": "^1.0.3" | ||
@@ -15,3 +15,3 @@ }, | ||
"@babel/cli": "^7.0.0-beta.40", | ||
"@govuk-react/api-docs": "^0.1.25", | ||
"@govuk-react/api-docs": "^0.1.26", | ||
"@storybook/addon-actions": "^3.3.14", | ||
@@ -18,0 +18,0 @@ "@storybook/react": "^3.3.14", |
@@ -5,2 +5,3 @@ // https://github.com/alphagov/govuk-frontend/tree/master/src/components/ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import * as COLOUR from 'govuk-colours'; | ||
@@ -25,4 +26,11 @@ import { FONT_SIZE, MEDIA_QUERIES, NTA_LIGHT } from '@govuk-react/constants'; | ||
const HintText = props => <GHintText {...props} />; | ||
const HintText = ({ children, ...props }) => ( | ||
<GHintText {...props}> | ||
{children} | ||
</GHintText>); | ||
HintText.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
}; | ||
export default HintText; |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
19948
192
3