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

@govuk-react/label

Package Overview
Dependencies
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-react/label - npm Package Compare versions

Comparing version 0.1.28 to 0.2.0

12

es/index.js

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

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