🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@govuk-react/label

Package Overview
Dependencies
Maintainers
5
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

to
0.6.0-rc.1

16

es/index.js

@@ -7,3 +7,6 @@ // https://github.com/alphagov/govuk-frontend/tree/master/src/components/

import { SPACING } from '@govuk-react/constants';
import { withWhiteSpace } from '@govuk-react/hoc';
import { spacing } from '@govuk-react/lib'; // TODO consider removing this, as it's not as per govuk-frontend
// NB our approach to labels/fields differs at present, which is why we have this
// we have no `form-group` - this, to an extent, replaces it...
var StyledLabel = styled('label')({

@@ -25,3 +28,5 @@ display: 'flex',

};
});
}, spacing.withWhiteSpace({
marginBottom: 0
}));
/**

@@ -45,5 +50,6 @@ *

export default withWhiteSpace({
marginBottom: 0
})(Label);
Label.defaultProps = {
error: false
};
export default Label;
//# sourceMappingURL=index.js.map

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

var _hoc = require("@govuk-react/hoc");
var _lib = require("@govuk-react/lib");

@@ -22,2 +22,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// https://github.com/alphagov/govuk-frontend/tree/master/src/components/
// TODO consider removing this, as it's not as per govuk-frontend
// NB our approach to labels/fields differs at present, which is why we have this
// we have no `form-group` - this, to an extent, replaces it...
var StyledLabel = (0, _styledComponents.default)('label')({

@@ -39,3 +42,5 @@ display: 'flex',

};
});
}, _lib.spacing.withWhiteSpace({
marginBottom: 0
}));
/**

@@ -59,8 +64,8 @@ *

var _default = (0, _hoc.withWhiteSpace)({
marginBottom: 0
})(Label);
Label.defaultProps = {
error: false
};
var _default = Label;
exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map
{
"name": "@govuk-react/label",
"version": "0.6.0-alpha.4",
"version": "0.6.0-rc.1",
"dependencies": {
"@govuk-react/constants": "^0.6.0-alpha.4",
"@govuk-react/hoc": "^0.6.0-alpha.4",
"@govuk-react/constants": "^0.6.0-rc.1",
"@govuk-react/lib": "^0.6.0-rc.1",
"govuk-colours": "^1.0.3"

@@ -8,0 +8,0 @@ },

@@ -24,3 +24,4 @@ Label

`children` | true | `````` | node | Text for the label
`error` | | ```false``` | bool | Apply error state styling to the component

@@ -8,4 +8,8 @@ // https://github.com/alphagov/govuk-frontend/tree/master/src/components/

import { SPACING } from '@govuk-react/constants';
import { withWhiteSpace } from '@govuk-react/hoc';
import { spacing } from '@govuk-react/lib';
// TODO consider removing this, as it's not as per govuk-frontend
// NB our approach to labels/fields differs at present, which is why we have this
// we have no `form-group` - this, to an extent, replaces it...
const StyledLabel = styled('label')(

@@ -27,2 +31,3 @@ {

}),
spacing.withWhiteSpace({ marginBottom: 0 }),
);

@@ -48,4 +53,14 @@

children: PropTypes.node.isRequired,
/**
* Apply error state styling to the component
*/
error: PropTypes.bool,
// NB these propTypes don't get documented :(
...spacing.withWhiteSpace.propTypes,
};
export default withWhiteSpace({ marginBottom: 0 })(Label);
Label.defaultProps = {
error: false,
};
export default Label;

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