New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@govuk-frederic/keyline

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-frederic/keyline - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

13

es/index.js
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'react-emotion';
import styled from 'styled-components';
import { withWhiteSpace } from '@govuk-react/hoc';
import { GREY_1 } from 'govuk-colours';
import { NTA_LIGHT } from '@govuk-react/constants';
var KeylineWrapper =
/*#__PURE__*/
styled('span', {
target: "e4u1u2g0",
label: "KeylineWrapper"
})(function (_ref) {
var KeylineWrapper = styled('span')(function (_ref) {
var inlineBlock = _ref.inlineBlock,

@@ -32,3 +27,3 @@ borderColor = _ref.borderColor;

* ```
*
*
* inlineBlock

@@ -40,3 +35,3 @@ * ```jsx

* ```
*
*
* inlineBlock with orange border

@@ -43,0 +38,0 @@ * ```jsx

import React from 'react';
import { mount, shallow } from 'enzyme';
import { createMatchers } from 'jest-emotion';
import * as emotion from 'emotion';
import Keyline from '.';
expect.extend(createMatchers(emotion));
describe('Keyline', function () {

@@ -14,3 +11,3 @@ it('renders without crashing', function () {

var wrapper = mount(React.createElement(Keyline, null, "Sample text"));
expect(wrapper.find('KeylineWrapper').childAt(0).text()).toBe('Sample text');
expect(wrapper.text()).toBe('Sample text');
});

@@ -17,0 +14,0 @@ it('renders as inlineBlock in response to prop', function () {

@@ -10,3 +10,3 @@ "use strict";

var _reactEmotion = _interopRequireDefault(require("react-emotion"));
var _styledComponents = _interopRequireDefault(require("styled-components"));

@@ -21,8 +21,3 @@ var _hoc = require("@govuk-react/hoc");

var KeylineWrapper =
/*#__PURE__*/
(0, _reactEmotion.default)('span', {
target: "e4u1u2g0",
label: "KeylineWrapper"
})(function (_ref) {
var KeylineWrapper = (0, _styledComponents.default)('span')(function (_ref) {
var inlineBlock = _ref.inlineBlock,

@@ -47,3 +42,3 @@ borderColor = _ref.borderColor;

* ```
*
*
* inlineBlock

@@ -55,3 +50,3 @@ * ```jsx

* ```
*
*
* inlineBlock with orange border

@@ -74,3 +69,3 @@ * ```jsx

exports.default = _default;
module.exports = exports["default"];
module.exports = exports.default;
//# sourceMappingURL=index.js.map

@@ -7,13 +7,6 @@ "use strict";

var _jestEmotion = require("jest-emotion");
var emotion = _interopRequireWildcard(require("emotion"));
var _ = _interopRequireDefault(require("."));
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
expect.extend((0, _jestEmotion.createMatchers)(emotion));
describe('Keyline', function () {

@@ -26,3 +19,3 @@ it('renders without crashing', function () {

var wrapper = (0, _enzyme.mount)(_react.default.createElement(_.default, null, "Sample text"));
expect(wrapper.find('KeylineWrapper').childAt(0).text()).toBe('Sample text');
expect(wrapper.text()).toBe('Sample text');
});

@@ -29,0 +22,0 @@ it('renders as inlineBlock in response to prop', function () {

{
"name": "@govuk-frederic/keyline",
"version": "0.1.1",
"version": "0.2.0",
"dependencies": {
"@govuk-frederic/result-count-title": "^0.1.1",
"@govuk-react/constants": "^0.2.7",
"@govuk-react/hoc": "^0.2.7",
"@govuk-frederic/result-count-title": "^0.2.0",
"@govuk-react/constants": "^0.6.0-alpha.1",
"@govuk-react/hoc": "^0.6.0-alpha.1",
"govuk-colours": "^1.0.3"
},
"devDependencies": {
"@govuk-react/storybook-components": "^0.2.4",
"@storybook/addon-knobs": "^3.4.2"
},
"peerDependencies": {
"emotion": ">=9",
"prop-types": ">=15",
"react": ">=16.2.0",
"react-emotion": ">=9"
"styled-components": ">=4"
},
"scripts": {
"build": "npm run build:lib && npm run build:es",
"build:lib": "rimraf lib && babel src -d lib --source-maps",
"build:es": "rimraf es && cross-env BABEL_ENV=es babel src -d es --source-maps",
"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",
"docs": "doc-component ./lib/index.js ./README.md"

@@ -25,0 +19,0 @@ },

import React from 'react';
import PropTypes from 'prop-types';
import styled from 'react-emotion';
import styled from 'styled-components';
import { withWhiteSpace } from '@govuk-react/hoc';

@@ -26,3 +26,3 @@

* ```
*
*
* inlineBlock

@@ -34,3 +34,3 @@ * ```jsx

* ```
*
*
* inlineBlock with orange border

@@ -37,0 +37,0 @@ * ```jsx

import React from 'react';
import { mount, shallow } from 'enzyme';
import { createMatchers } from 'jest-emotion';
import * as emotion from 'emotion';
import Keyline from '.';
expect.extend(createMatchers(emotion));
describe('Keyline', () => {

@@ -18,3 +14,3 @@ it('renders without crashing', () => {

const wrapper = mount(<Keyline>Sample text</Keyline>);
expect(wrapper.find('KeylineWrapper').childAt(0).text()).toBe('Sample text');
expect(wrapper.text()).toBe('Sample text');
});

@@ -24,8 +20,8 @@

const wrapper = mount(<Keyline inlineBlock />);
expect(wrapper).toHaveStyleRule('display', 'inline-block');
expect(wrapper).toHaveStyleRule('display', 'inline-block');
});
it('renders with borderColor in response to prop', () => {
const wrapper = mount(<Keyline borderColor="red" />);
expect(wrapper).toHaveStyleRule('border-bottom', '1px solid red');
expect(wrapper).toHaveStyleRule('border-bottom', '1px solid red');
});

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

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