@govuk-react/label
Advanced tools
Comparing version 0.1.28 to 0.2.0
@@ -1,2 +0,2 @@ | ||
var _glamorous$label; | ||
var _styled; | ||
@@ -8,3 +8,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
// https://github.com/alphagov/govuk-frontend/tree/master/src/components/ | ||
import glamorous from 'glamorous'; | ||
import styled from 'react-emotion'; | ||
import React from 'react'; | ||
@@ -15,3 +15,3 @@ import PropTypes from 'prop-types'; | ||
import { withWhiteSpace } from '@govuk-react/hoc'; | ||
var GLabel = glamorous.label((_glamorous$label = { | ||
var StyledLabel = styled('label')((_styled = { | ||
display: 'flex', | ||
@@ -26,5 +26,5 @@ flexDirection: 'column', | ||
} | ||
}, _glamorous$label[MEDIA_QUERIES.LARGESCREEN] = { | ||
}, _styled[MEDIA_QUERIES.LARGESCREEN] = { | ||
maxWidth: SITE_WIDTH | ||
}, _glamorous$label), function (_ref) { | ||
}, _styled), function (_ref) { | ||
var error = _ref.error; | ||
@@ -42,3 +42,3 @@ return { | ||
return React.createElement(GLabel, _extends({ | ||
return React.createElement(StyledLabel, _extends({ | ||
className: className | ||
@@ -45,0 +45,0 @@ }, props)); |
@@ -6,3 +6,3 @@ "use strict"; | ||
var _glamorous = _interopRequireDefault(require("glamorous")); | ||
var _reactEmotion = _interopRequireDefault(require("react-emotion")); | ||
@@ -19,3 +19,3 @@ var _react = _interopRequireDefault(require("react")); | ||
var _glamorous$label; | ||
var _styled; | ||
@@ -28,3 +28,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var GLabel = _glamorous.default.label((_glamorous$label = { | ||
var StyledLabel = (0, _reactEmotion.default)('label')((_styled = { | ||
display: 'flex', | ||
@@ -39,5 +39,5 @@ flexDirection: 'column', | ||
} | ||
}, _glamorous$label[_constants.MEDIA_QUERIES.LARGESCREEN] = { | ||
}, _styled[_constants.MEDIA_QUERIES.LARGESCREEN] = { | ||
maxWidth: _constants.SITE_WIDTH | ||
}, _glamorous$label), function (_ref) { | ||
}, _styled), function (_ref) { | ||
var error = _ref.error; | ||
@@ -55,3 +55,3 @@ return { | ||
return _react.default.createElement(GLabel, _extends({ | ||
return _react.default.createElement(StyledLabel, _extends({ | ||
className: className | ||
@@ -58,0 +58,0 @@ }, props)); |
{ | ||
"name": "@govuk-react/label", | ||
"version": "0.1.28", | ||
"version": "0.2.0", | ||
"dependencies": { | ||
"@govuk-react/constants": "^0.1.28", | ||
"@govuk-react/hoc": "^0.1.28", | ||
"@govuk-react/constants": "^0.2.0", | ||
"@govuk-react/hoc": "^0.2.0", | ||
"govuk-colours": "^1.0.3" | ||
}, | ||
"peerDependencies": { | ||
"glamorous": ">=4", | ||
"emotion": ">=9", | ||
"prop-types": ">=15", | ||
"react": ">=15" | ||
"react": ">=16.2.0", | ||
"react-emotion": ">=9" | ||
}, | ||
@@ -25,3 +26,3 @@ "scripts": { | ||
"homepage": "https://github.com/penx/govuk-react#readme", | ||
"description": "govuk-react: A port of the govuk-frontend components for React using Glamorous.", | ||
"description": "govuk-react: A port of the govuk-frontend components for React using Emotion.", | ||
"private": false, | ||
@@ -28,0 +29,0 @@ "publishConfig": { |
// https://github.com/alphagov/govuk-frontend/tree/master/src/components/ | ||
import glamorous from 'glamorous'; | ||
import styled from 'react-emotion'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { ERROR_COLOUR } from 'govuk-colours'; | ||
@@ -11,3 +10,3 @@ import { MEDIA_QUERIES, SITE_WIDTH, SPACING } from '@govuk-react/constants'; | ||
const GLabel = glamorous.label( | ||
const StyledLabel = styled('label')( | ||
{ | ||
@@ -34,3 +33,3 @@ display: 'flex', | ||
const Label = ({ className, ...props }) => (<GLabel className={className} {...props} />); | ||
const Label = ({ className, ...props }) => (<StyledLabel className={className} {...props} />); | ||
@@ -37,0 +36,0 @@ Label.defaultProps = { |
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { mount } from 'enzyme'; | ||
import Label from './'; | ||
@@ -5,0 +6,0 @@ |
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
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
23993
7
+ Added@govuk-react/constants@0.2.7(transitive)
+ Added@govuk-react/hoc@0.2.7(transitive)
+ Added@govuk-react/icons@0.2.7(transitive)
+ Addedemotion@11.0.0(transitive)
+ Addedreact-emotion@10.0.0(transitive)
- Removed@govuk-react/constants@0.1.28(transitive)
- Removed@govuk-react/hoc@0.1.28(transitive)
- Removed@govuk-react/icons@0.1.28(transitive)
- Removedasap@2.0.6(transitive)
- Removedbowser@1.9.4(transitive)
- Removedbrcast@3.0.2(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedcss-in-js-utils@2.0.1(transitive)
- Removedcsstype@2.6.21(transitive)
- Removedencoding@0.1.13(transitive)
- Removedfast-memoize@2.5.2(transitive)
- Removedfbjs@0.8.18(transitive)
- Removedglamor@2.20.40(transitive)
- Removedglamorous@5.0.0(transitive)
- Removedhtml-element-attributes@1.3.1(transitive)
- Removedhtml-tag-names@1.1.5(transitive)
- Removedhyphenate-style-name@1.1.0(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedinline-style-prefixer@3.0.8(transitive)
- Removedis-function@1.0.2(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisobject@3.0.1(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedpromise@7.3.1(transitive)
- Removedreact-html-attributes@1.4.6(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedsvg-tag-names@1.1.2(transitive)
- Removedthrough@2.3.8(transitive)
- Removedua-parser-js@0.7.39(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)
Updated@govuk-react/hoc@^0.2.0