@govuk-react/label
Advanced tools
Comparing version 0.10.5 to 0.10.6
export * from "./declarations/src/index"; | ||
export { default } from "./declarations/src/index"; | ||
//# sourceMappingURL=govuk-react-label.cjs.d.ts.map |
@@ -15,2 +15,4 @@ 'use strict'; | ||
// https://github.com/alphagov/govuk-frontend/tree/main/src/govuk/components/ | ||
// Our approach to labels/fields differs to govuk-frontend. | ||
// We have no `form-group` - this, to an extent, replaces it. | ||
@@ -24,4 +26,3 @@ // We wrap form inputs with a label to associate them, rather than rely on an ID. | ||
*/ | ||
var Label = styled__default["default"]('label').withConfig({ | ||
const Label = styled__default["default"]('label').withConfig({ | ||
displayName: "src__Label", | ||
@@ -38,6 +39,8 @@ componentId: "sc-iqzvxn-0" | ||
} | ||
}, function (_ref) { | ||
var error = _ref.error; | ||
}, _ref => { | ||
let { | ||
error | ||
} = _ref; | ||
return { | ||
borderLeft: error ? "4px solid ".concat(govukColours.ERROR_COLOUR) : undefined, | ||
borderLeft: error ? `4px solid ${govukColours.ERROR_COLOUR}` : undefined, | ||
marginRight: error ? constants.SPACING.SCALE_3 : undefined, | ||
@@ -44,0 +47,0 @@ paddingLeft: error ? constants.SPACING.SCALE_2 : undefined |
@@ -15,2 +15,4 @@ 'use strict'; | ||
// https://github.com/alphagov/govuk-frontend/tree/main/src/govuk/components/ | ||
// Our approach to labels/fields differs to govuk-frontend. | ||
// We have no `form-group` - this, to an extent, replaces it. | ||
@@ -24,4 +26,3 @@ // We wrap form inputs with a label to associate them, rather than rely on an ID. | ||
*/ | ||
var Label = styled__default["default"]('label').withConfig({ | ||
const Label = styled__default["default"]('label').withConfig({ | ||
displayName: "src__Label", | ||
@@ -38,6 +39,8 @@ componentId: "sc-iqzvxn-0" | ||
} | ||
}, function (_ref) { | ||
var error = _ref.error; | ||
}, _ref => { | ||
let { | ||
error | ||
} = _ref; | ||
return { | ||
borderLeft: error ? "4px solid ".concat(govukColours.ERROR_COLOUR) : undefined, | ||
borderLeft: error ? `4px solid ${govukColours.ERROR_COLOUR}` : undefined, | ||
marginRight: error ? constants.SPACING.SCALE_3 : undefined, | ||
@@ -44,0 +47,0 @@ paddingLeft: error ? constants.SPACING.SCALE_2 : undefined |
@@ -7,2 +7,4 @@ import styled from 'styled-components'; | ||
// https://github.com/alphagov/govuk-frontend/tree/main/src/govuk/components/ | ||
// Our approach to labels/fields differs to govuk-frontend. | ||
// We have no `form-group` - this, to an extent, replaces it. | ||
@@ -16,4 +18,3 @@ // We wrap form inputs with a label to associate them, rather than rely on an ID. | ||
*/ | ||
var Label = styled('label').withConfig({ | ||
const Label = styled('label').withConfig({ | ||
displayName: "src__Label", | ||
@@ -30,6 +31,8 @@ componentId: "sc-iqzvxn-0" | ||
} | ||
}, function (_ref) { | ||
var error = _ref.error; | ||
}, _ref => { | ||
let { | ||
error | ||
} = _ref; | ||
return { | ||
borderLeft: error ? "4px solid ".concat(ERROR_COLOUR) : undefined, | ||
borderLeft: error ? `4px solid ${ERROR_COLOUR}` : undefined, | ||
marginRight: error ? SPACING.SCALE_3 : undefined, | ||
@@ -36,0 +39,0 @@ paddingLeft: error ? SPACING.SCALE_2 : undefined |
{ | ||
"name": "@govuk-react/label", | ||
"version": "0.10.5", | ||
"version": "0.10.6", | ||
"dependencies": { | ||
"@govuk-react/constants": "^0.10.5", | ||
"@govuk-react/lib": "^0.10.5", | ||
"@govuk-react/constants": "^0.10.6", | ||
"@govuk-react/lib": "^0.10.6", | ||
"govuk-colours": "^1.1.0" | ||
@@ -8,0 +8,0 @@ }, |
244
30100
Updated@govuk-react/lib@^0.10.6