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

@govuk-react/label-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/label-text - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

src/__snapshots__/test.tsx.snap

8

es/index.js
import styled from 'styled-components';
import React from 'react';
import PropTypes from 'prop-types';
import { spacing, typography } from '@govuk-react/lib'; // TODO should `LabelText` and `Label` be consolidated?

@@ -10,3 +9,3 @@ // TODO add support for differing font sizes, as per govuk-frontend - see:

displayName: "src__StyledLabelText",
componentId: "sc-12l0n4z-0"
componentId: "sc-1lbxenh-0"
})(typography.font({

@@ -18,7 +17,2 @@ size: 19

paddingBottom: '2px'
}, function (_ref) {
var error = _ref.error;
return {
fontWeight: error ? 700 : undefined
};
}, spacing.withWhiteSpace({

@@ -25,0 +19,0 @@ marginBottom: 0

@@ -8,6 +8,3 @@ import React from 'react';

var example = 'example';
var wrapper = /*#__PURE__*/React.createElement(LabelText, {
error: example
}, example);
var noError = /*#__PURE__*/React.createElement(LabelText, null, example);
var wrapper = /*#__PURE__*/React.createElement(LabelText, null, example);
beforeEach(function () {

@@ -28,6 +25,3 @@ props = {

});
it('matches noError snapshot', function () {
expect(mount(noError)).toMatchSnapshot('no error mount');
});
});
//# sourceMappingURL=test.js.map

@@ -10,4 +10,2 @@ "use strict";

var _propTypes = _interopRequireDefault(require("prop-types"));
var _lib = require("@govuk-react/lib");

@@ -22,3 +20,3 @@

displayName: "src__StyledLabelText",
componentId: "sc-12l0n4z-0"
componentId: "sc-1lbxenh-0"
})(_lib.typography.font({

@@ -30,7 +28,2 @@ size: 19

paddingBottom: '2px'
}, function (_ref) {
var error = _ref.error;
return {
fontWeight: error ? 700 : undefined
};
}, _lib.spacing.withWhiteSpace({

@@ -37,0 +30,0 @@ marginBottom: 0

@@ -17,8 +17,4 @@ "use strict";

var wrapper = /*#__PURE__*/_react["default"].createElement(_["default"], {
error: example
}, example);
var wrapper = /*#__PURE__*/_react["default"].createElement(_["default"], null, example);
var noError = /*#__PURE__*/_react["default"].createElement(_["default"], null, example);
beforeEach(function () {

@@ -40,6 +36,3 @@ props = {

});
it('matches noError snapshot', function () {
expect((0, _enzyme.mount)(noError)).toMatchSnapshot('no error mount');
});
});
//# sourceMappingURL=test.js.map
{
"name": "@govuk-react/label-text",
"version": "0.9.0",
"version": "0.9.1",
"dependencies": {
"@govuk-react/lib": "^0.9.0"
"@govuk-react/lib": "^0.9.1"
},

@@ -13,4 +13,4 @@ "peerDependencies": {

"build": "yarn build:lib && yarn build:es",
"build:lib": "rimraf lib && babel src -d lib --source-maps --config-file ../../babel.config.js",
"build:es": "rimraf es && cross-env BABEL_ENV=es babel src -d es --source-maps --config-file ../../babel.config.js",
"build:lib": "rimraf lib && babel src -x .js,jsx,.ts,.tsx -d lib --source-maps --config-file ../../babel.config.js",
"build:es": "rimraf es && cross-env BABEL_ENV=es babel src -x .js,jsx,.ts,.tsx -d es --source-maps --config-file ../../babel.config.js",
"docs": "doc-component ./lib/index.js ./README.md"

@@ -17,0 +17,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

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