@comicrelief/component-library 8.18.4 → 8.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/components/Atoms/ErrorText/ErrorText.js +3 -15
  2. package/dist/components/Atoms/ErrorText/__snapshots__/ErrorText.test.js.snap +1 -17
  3. package/dist/components/Atoms/Input/Input.js +39 -24
  4. package/dist/components/Atoms/Input/Input.md +1 -2
  5. package/dist/components/Atoms/Input/assets/error-alert-icon-red.svg +10 -0
  6. package/dist/components/Atoms/Input/input.test.js +1 -1
  7. package/dist/components/Atoms/Label/Label.js +16 -10
  8. package/dist/components/Atoms/Select/__snapshots__/Select.test.js.snap +2 -2
  9. package/dist/components/Atoms/TextArea/TextArea.test.js +1 -1
  10. package/dist/components/Atoms/TextInputWithDropdown/__snapshots__/TextInputWithDropdown.test.js.snap +160 -84
  11. package/dist/components/Molecules/SchoolLookup/__snapshots__/SchoolLookup.test.js.snap +48 -20
  12. package/dist/components/Molecules/SearchInput/SearchInput.test.js +1 -1
  13. package/dist/components/Molecules/Typeahead/__snapshots__/Typeahead.test.js.snap +48 -20
  14. package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +306 -179
  15. package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +89 -59
  16. package/dist/components/Organisms/Membership/Membership.test.js +2 -2
  17. package/package.json +1 -1
  18. package/src/components/Atoms/ErrorText/ErrorText.js +1 -19
  19. package/src/components/Atoms/ErrorText/__snapshots__/ErrorText.test.js.snap +1 -17
  20. package/src/components/Atoms/Input/Input.js +54 -20
  21. package/src/components/Atoms/Input/Input.md +1 -2
  22. package/src/components/Atoms/Input/assets/error-alert-icon-red.svg +10 -0
  23. package/src/components/Atoms/Input/input.test.js +44 -16
  24. package/src/components/Atoms/Label/Label.js +25 -9
  25. package/src/components/Atoms/Select/__snapshots__/Select.test.js.snap +2 -2
  26. package/src/components/Atoms/TextArea/TextArea.test.js +2 -2
  27. package/src/components/Atoms/TextInputWithDropdown/__snapshots__/TextInputWithDropdown.test.js.snap +160 -84
  28. package/src/components/Molecules/SchoolLookup/__snapshots__/SchoolLookup.test.js.snap +48 -20
  29. package/src/components/Molecules/SearchInput/SearchInput.test.js +47 -19
  30. package/src/components/Molecules/Typeahead/__snapshots__/Typeahead.test.js.snap +48 -20
  31. package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +306 -179
  32. package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +89 -59
  33. package/src/components/Organisms/Membership/Membership.test.js +121 -86
  34. package/dist/components/Atoms/Input/assets/CR_Error--red.svg +0 -1
  35. package/dist/components/Atoms/Input/assets/CR_Error.svg +0 -1
  36. package/dist/components/Atoms/Input/assets/error-alert-icon.png +0 -0
  37. package/src/components/Atoms/Input/assets/CR_Error--red.svg +0 -1
  38. package/src/components/Atoms/Input/assets/CR_Error.svg +0 -1
  39. package/src/components/Atoms/Input/assets/error-alert-icon.png +0 -0
@@ -8,27 +8,15 @@ exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _Text = _interopRequireDefault(require("../Text/Text"));
11
- var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
12
- var _CR_ErrorRed = _interopRequireDefault(require("../Input/assets/CR_Error--red.svg"));
13
11
  const ErrorIcon = _styledComponents.default.span.withConfig({
14
12
  displayName: "ErrorText__ErrorIcon",
15
13
  componentId: "sc-19bj17r-0"
16
- })(["display:inline-block;padding:", " ", " ", ";width:100%;z-index:1;margin-top:-10px;background-color:", ";border-radius:", ";font-weight:bold;:before{position:relative;content:'';top:1px;margin-right:3px;background:url(", ") left 0/100% no-repeat;width:18px;height:19px;display:inline-block;vertical-align:top;color:", ";}"], (0, _spacing.default)('m'), (0, _spacing.default)('md'), (0, _spacing.default)('md'), _ref => {
17
- let {
18
- theme
19
- } = _ref;
20
- return theme.color('error_pink');
21
- }, (0, _spacing.default)('sm'), _CR_ErrorRed.default, _ref2 => {
22
- let {
23
- theme
24
- } = _ref2;
25
- return theme.color('red');
26
- });
27
- const ErrorText = _ref3 => {
14
+ })(["display:inline-block;width:100%;z-index:1;font-weight:bold;padding:0.6rem 0 1rem;"]);
15
+ const ErrorText = _ref => {
28
16
  let {
29
17
  children,
30
18
  ...rest
31
- } = _ref3;
19
+ } = _ref;
32
20
  return /*#__PURE__*/_react.default.createElement(_Text.default, Object.assign({}, rest, {
33
21
  color: "red"
34
22
  }), /*#__PURE__*/_react.default.createElement(ErrorIcon, null, children));
@@ -10,26 +10,10 @@ exports[`renders correctly 1`] = `
10
10
 
11
11
  .c1 {
12
12
  display: inline-block;
13
- padding: 1.5rem 1rem 1rem;
14
13
  width: 100%;
15
14
  z-index: 1;
16
- margin-top: -10px;
17
- background-color: #FAE1E2;
18
- border-radius: 0.5rem;
19
15
  font-weight: bold;
20
- }
21
-
22
- .c1:before {
23
- position: relative;
24
- content: '';
25
- top: 1px;
26
- margin-right: 3px;
27
- background: url(mock.asset) left 0/100% no-repeat;
28
- width: 18px;
29
- height: 19px;
30
- display: inline-block;
31
- vertical-align: top;
32
- color: #E52630;
16
+ padding: 0.6rem 0 1rem;
33
17
  }
34
18
 
35
19
  <span
@@ -9,48 +9,61 @@ exports.default = void 0;
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
12
+ var _errorAlertIconRed = _interopRequireDefault(require("./assets/error-alert-icon-red.svg"));
12
13
  var _Label = _interopRequireDefault(require("../Label/Label"));
13
14
  var _ErrorText = _interopRequireDefault(require("../ErrorText/ErrorText"));
14
- var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
15
15
  var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
16
16
  // This seems to get a decent approximation of the necessary width (without resorting to measuring
17
17
  // the element with JS)
18
- const getPrefixWidth = prefixLength => "calc(".concat((0, _spacing.default)('m'), " + (").concat(prefixLength, " * ").concat((0, _spacing.default)('sm'), "))");
19
- const InputField = _styledComponents.default.input.withConfig({
20
- displayName: "Input__InputField",
18
+ const getPrefixWidth = prefixLength => "calc(1.5rem + (".concat(prefixLength, " * 0.5rem))");
19
+ const InputWrapper = _styledComponents.default.div.withConfig({
20
+ displayName: "Input__InputWrapper",
21
21
  componentId: "sc-bcqy1o-0"
22
- })(["", ""], _ref => {
22
+ })(["position:relative;font-size:", ";"], _ref => {
23
23
  let {
24
- theme,
25
- error,
26
- prefixLength
24
+ theme
27
25
  } = _ref;
28
- return (0, _styledComponents.css)(["position:relative;box-sizing:border-box;width:100%;height:48px;padding:", " ", ";", " background-color:", ";border:1px solid;border-color:", ";box-shadow:none;appearance:none;color:", ";border-radius:", ";font-size:inherit;z-index:2;font-family:", ";:focus{border:1px solid ", ";}@media ", "{max-width:290px;}"], (0, _spacing.default)('md'), (0, _spacing.default)('m'), prefixLength > 0 ? "padding-left: ".concat(getPrefixWidth(prefixLength), ";") : '', theme.color('grey_light'), error ? theme.color('red') : theme.color('grey_medium'), theme.color('black'), (0, _spacing.default)('sm'), theme.fontFamilies(theme.font.regular), theme.color('grey_for_forms'), theme.allBreakpoints('M'));
26
+ return theme.fontSize('m');
29
27
  });
30
- const InputWrapper = _styledComponents.default.div.withConfig({
31
- displayName: "Input__InputWrapper",
28
+ const InputFieldContainer = _styledComponents.default.div.withConfig({
29
+ displayName: "Input__InputFieldContainer",
32
30
  componentId: "sc-bcqy1o-1"
33
- })(["position:relative;font-size:", ";"], _ref2 => {
31
+ })(["position:relative;width:100%;display:flex;justify-content:flex-end;align-items:center;@media ", "{max-width:290px;}"], _ref2 => {
34
32
  let {
35
33
  theme
36
34
  } = _ref2;
37
- return theme.fontSize('m');
35
+ return theme.allBreakpoints('M');
38
36
  });
37
+ const InputField = _styledComponents.default.input.withConfig({
38
+ displayName: "Input__InputField",
39
+ componentId: "sc-bcqy1o-2"
40
+ })(["", ""], _ref3 => {
41
+ let {
42
+ theme,
43
+ error,
44
+ prefixLength
45
+ } = _ref3;
46
+ return (0, _styledComponents.css)(["position:relative;box-sizing:border-box;width:100%;height:48px;padding:1rem 2.4rem 1rem 1.5rem;", " background-color:", ";border:1px solid;border-color:", ";box-shadow:none;appearance:none;color:", ";border-radius:0.5rem;font-size:inherit;z-index:2;font-family:", ";:focus{border:1px solid ", ";}@media ", "{max-width:290px;}"], prefixLength > 0 ? "padding-left: ".concat(getPrefixWidth(prefixLength), ";") : '', theme.color('grey_light'), error ? theme.color('red') : theme.color('grey_medium'), theme.color('black'), theme.fontFamilies(theme.font.regular), theme.color('grey_for_forms'), theme.allBreakpoints('M'));
47
+ });
48
+ const ErrorIconWrapper = _styledComponents.default.div.withConfig({
49
+ displayName: "Input__ErrorIconWrapper",
50
+ componentId: "sc-bcqy1o-3"
51
+ })(["position:absolute;right:0.6rem;background:url(", ") center/contain no-repeat;--iconSize:19px;width:var(--iconSize);height:var(--iconSize);z-index:3;"], _errorAlertIconRed.default);
39
52
  const Prefix = _styledComponents.default.div.withConfig({
40
53
  displayName: "Input__Prefix",
41
- componentId: "sc-bcqy1o-2"
42
- })(["position:absolute;left:0;top:0;", " display:flex;height:100%;width:", ";justify-content:center;align-items:center;color:", ";font-weight:700;font-size:inherit;margin-left:2px;"], (0, _zIndex.default)('high'), _ref3 => {
54
+ componentId: "sc-bcqy1o-4"
55
+ })(["position:absolute;left:0;top:0;", " display:flex;height:100%;width:", ";justify-content:center;align-items:center;color:", ";font-weight:700;font-size:inherit;margin-left:2px;"], (0, _zIndex.default)('high'), _ref4 => {
43
56
  let {
44
57
  length
45
- } = _ref3;
58
+ } = _ref4;
46
59
  return getPrefixWidth(length);
47
- }, _ref4 => {
60
+ }, _ref5 => {
48
61
  let {
49
62
  theme
50
- } = _ref4;
63
+ } = _ref5;
51
64
  return theme.color('grey_dark');
52
65
  });
53
- const Input = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
66
+ const Input = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
54
67
  let {
55
68
  errorMsg = '',
56
69
  id,
@@ -64,7 +77,7 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
64
77
  prefix = '',
65
78
  optional = null,
66
79
  ...rest
67
- } = _ref5;
80
+ } = _ref6;
68
81
  return /*#__PURE__*/_react.default.createElement(_Label.default, Object.assign({
69
82
  className: className,
70
83
  htmlFor: id,
@@ -72,18 +85,20 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
72
85
  hideLabel: !showLabel,
73
86
  errorMsg: errorMsg,
74
87
  optional: optional
75
- }, labelProps), /*#__PURE__*/_react.default.createElement(InputWrapper, null, prefix && /*#__PURE__*/_react.default.createElement(Prefix, {
88
+ }, labelProps), /*#__PURE__*/_react.default.createElement(InputWrapper, {
89
+ error: Boolean(errorMsg)
90
+ }, prefix && /*#__PURE__*/_react.default.createElement(Prefix, {
76
91
  length: prefix.length
77
- }, prefix), /*#__PURE__*/_react.default.createElement(InputField, Object.assign({
92
+ }, prefix), /*#__PURE__*/_react.default.createElement(InputFieldContainer, null, /*#__PURE__*/_react.default.createElement(InputField, Object.assign({
78
93
  id: id,
79
94
  type: type,
80
95
  placeholder: placeholder,
81
- error: !!errorMsg,
96
+ error: Boolean(errorMsg),
82
97
  "aria-describedby": hasAria ? id : undefined,
83
98
  ref: ref,
84
99
  prefixLength: prefix.length,
85
100
  required: optional === false
86
- }, rest))), errorMsg && /*#__PURE__*/_react.default.createElement(_ErrorText.default, {
101
+ }, rest)), errorMsg && /*#__PURE__*/_react.default.createElement(ErrorIconWrapper, null))), errorMsg && /*#__PURE__*/_react.default.createElement(_ErrorText.default, {
87
102
  size: "sm",
88
103
  weight: "bold",
89
104
  "data-test": "error-message"
@@ -19,7 +19,6 @@
19
19
  label="Label"
20
20
  errorMsg="This is an error message"
21
21
  id="input-example-2"
22
- showLabel={false}
23
22
  />
24
23
  ```
25
24
 
@@ -103,6 +102,6 @@ const ItalicText = styled(Text).attrs({weight: 'normal'})`
103
102
  const price = event.target.value;
104
103
  if (typeof Number(price) === 'number') {
105
104
  event.target.value = Number(price).toFixed(2);
106
- }
105
+ }
107
106
  }}
108
107
  />
@@ -0,0 +1,10 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_2432_14605)">
3
+ <path d="M12 0.5C5.6585 0.5 0.5 5.659 0.5 12C0.5 18.341 5.6585 23.5 12 23.5C18.3415 23.5 23.5 18.341 23.5 12C23.5 5.659 18.3415 0.5 12 0.5ZM10.5 6C10.5 5.1715 11.1715 4.5 12 4.5C12.8285 4.5 13.5 5.1715 13.5 6V13C13.5 13.8285 12.8285 14.5 12 14.5C11.1715 14.5 10.5 13.8285 10.5 13V6ZM12 19.5C10.897 19.5 10 18.603 10 17.5C10 16.397 10.897 15.5 12 15.5C13.103 15.5 14 16.397 14 17.5C14 18.603 13.103 19.5 12 19.5Z" fill="#E52630"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_2432_14605">
7
+ <rect width="24" height="24" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -14,5 +14,5 @@ it('renders correctly', () => {
14
14
  errorMsg: "",
15
15
  id: "Accessibility info go here"
16
16
  })).toJSON();
17
- expect(tree).toMatchInlineSnapshot("\n .c1 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-weight: bold;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c0 {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n width: 100%;\n }\n\n .c2 {\n margin-bottom: 0.5rem;\n }\n\n .c4 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c4:focus {\n border: 1px solid #666;\n }\n\n .c3 {\n position: relative;\n font-size: 1.25rem;\n }\n\n @media (min-width:740px) {\n .c4 {\n max-width: 290px;\n }\n }\n\n <label\n className=\"c0\"\n htmlFor=\"Accessibility info go here\"\n >\n <span\n className=\"c1 c2\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"Label\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c3\"\n >\n \n <input\n aria-describedby=\"Accessibility info go here\"\n className=\"c4\"\n id=\"Accessibility info go here\"\n name=\"fullname\"\n placeholder=\"This is the hint text\"\n required={false}\n type=\"text\"\n />\n </div>\n \n </label>\n ");
17
+ expect(tree).toMatchInlineSnapshot("\n .c1 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c0 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c2 {\n margin-bottom: 0.5rem;\n font-weight: normal;\n }\n\n .c3 {\n position: relative;\n font-size: 1.25rem;\n }\n\n .c4 {\n position: relative;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c5 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c5:focus {\n border: 1px solid #666;\n }\n\n @media (min-width:740px) {\n .c4 {\n max-width: 290px;\n }\n }\n\n @media (min-width:740px) {\n .c5 {\n max-width: 290px;\n }\n }\n\n <label\n className=\"c0\"\n htmlFor=\"Accessibility info go here\"\n >\n <span\n className=\"c1 c2\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"Label\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c3\"\n >\n \n <div\n className=\"c4\"\n >\n <input\n aria-describedby=\"Accessibility info go here\"\n className=\"c5\"\n id=\"Accessibility info go here\"\n name=\"fullname\"\n placeholder=\"This is the hint text\"\n required={false}\n type=\"text\"\n />\n \n </div>\n </div>\n \n </label>\n ");
18
18
  });
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
10
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
11
  var _Text = _interopRequireDefault(require("../Text/Text"));
11
12
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
@@ -13,11 +14,12 @@ var _hideVisually = _interopRequireDefault(require("../../../theme/shared/hideVi
13
14
  const LabelElement = _styledComponents.default.label.withConfig({
14
15
  displayName: "Label__LabelElement",
15
16
  componentId: "sc-2nrw50-0"
16
- })(["position:relative;display:flex;flex-direction:column;color:", ";width:100%;", ""], _ref => {
17
+ })(["width:100%;position:relative;display:flex;flex-direction:column;color:", ";", ""], _ref => {
17
18
  let {
18
- theme
19
+ theme,
20
+ errorMsg
19
21
  } = _ref;
20
- return theme.color('grey_label');
22
+ return errorMsg ? theme.color('red') : theme.color('grey_label');
21
23
  }, _ref2 => {
22
24
  let {
23
25
  optional,
@@ -25,12 +27,10 @@ const LabelElement = _styledComponents.default.label.withConfig({
25
27
  } = _ref2;
26
28
  return optional === true && "\n :after {\n position: absolute;\n top: 0;\n right: 0;\n content: 'Optional';\n font-family: ".concat(theme.fontFamilies(theme.font.regular), ";\n font-size: ").concat(theme.fontSize('s'), ";\n }");
27
29
  });
28
- const VisibleText = (0, _styledComponents.default)(_Text.default).attrs({
29
- weight: 'bold'
30
- }).withConfig({
30
+ const VisibleText = (0, _styledComponents.default)(_Text.default).withConfig({
31
31
  displayName: "Label__VisibleText",
32
32
  componentId: "sc-2nrw50-1"
33
- })(["margin-bottom:", ";"], (0, _spacing.default)('sm'));
33
+ })(["margin-bottom:", ";font-weight:normal;"], (0, _spacing.default)('sm'));
34
34
  const HiddenText = (0, _styledComponents.default)(_Text.default).withConfig({
35
35
  displayName: "Label__HiddenText",
36
36
  componentId: "sc-2nrw50-2"
@@ -65,13 +65,19 @@ const Label = _ref4 => {
65
65
  label,
66
66
  hideLabel = false,
67
67
  optional = null,
68
+ errorMsg = '',
68
69
  ...rest
69
70
  } = _ref4;
70
- return /*#__PURE__*/_react.default.createElement(LabelElement, Object.assign({}, rest, {
71
- optional: optional
72
- }), /*#__PURE__*/_react.default.createElement(LabelText, {
71
+ return /*#__PURE__*/_react.default.createElement(LabelElement, Object.assign({
72
+ optional: optional,
73
+ errorMsg: errorMsg
74
+ }, rest), /*#__PURE__*/_react.default.createElement(LabelText, {
73
75
  label: label,
74
76
  hideLabel: hideLabel
75
77
  }), children);
76
78
  };
79
+ LabelElement.propTypes = {
80
+ optional: _propTypes.default.bool,
81
+ errorMsg: _propTypes.default.string
82
+ };
77
83
  var _default = exports.default = Label;
@@ -5,12 +5,12 @@ exports[`renders correctly 1`] = `
5
5
  font-size: 1rem;
6
6
  line-height: 1rem;
7
7
  text-transform: inherit;
8
- font-weight: bold;
9
8
  line-height: normal;
10
9
  font-family: 'Montserrat',Helvetica,Arial,sans-serif;
11
10
  }
12
11
 
13
12
  .c0 {
13
+ width: 100%;
14
14
  position: relative;
15
15
  display: -webkit-box;
16
16
  display: -webkit-flex;
@@ -20,11 +20,11 @@ exports[`renders correctly 1`] = `
20
20
  -ms-flex-direction: column;
21
21
  flex-direction: column;
22
22
  color: #5C5C5E;
23
- width: 100%;
24
23
  }
25
24
 
26
25
  .c2 {
27
26
  margin-bottom: 0.5rem;
27
+ font-weight: normal;
28
28
  }
29
29
 
30
30
  .c3 {
@@ -14,5 +14,5 @@ it('renders correctly', () => {
14
14
  errorMsg: "",
15
15
  id: "Please leave your comment here"
16
16
  })).toJSON();
17
- expect(tree).toMatchInlineSnapshot("\n .c1 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-weight: bold;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c0 {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n width: 100%;\n }\n\n .c2 {\n margin-bottom: 0.5rem;\n }\n\n .c3 {\n box-sizing: border-box;\n width: 100%;\n margin: 0;\n padding: 1rem 1.5rem;\n font-size: 1.25rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-radius: 0.5rem;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n resize: vertical;\n }\n\n .c3:focus {\n border: 1px solid #666;\n }\n\n .c3:focus::-webkit-input-placeholder {\n visibility: hidden;\n }\n\n .c3:focus::-moz-placeholder {\n visibility: hidden;\n }\n\n .c3:focus:-ms-input-placeholder {\n visibility: hidden;\n }\n\n .c3:focus::placeholder {\n visibility: hidden;\n }\n\n <label\n className=\"c0\"\n htmlFor=\"Please leave your comment here\"\n >\n <span\n className=\"c1 c2\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"Label\",\n }\n }\n size=\"s\"\n />\n <textarea\n aria-describedby=\"Please leave your comment here\"\n className=\"c3\"\n name=\"description\"\n placeholder=\"This is text area\"\n rows={5}\n />\n \n </label>\n ");
17
+ expect(tree).toMatchInlineSnapshot("\n .c1 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c0 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c2 {\n margin-bottom: 0.5rem;\n font-weight: normal;\n }\n\n .c3 {\n box-sizing: border-box;\n width: 100%;\n margin: 0;\n padding: 1rem 1.5rem;\n font-size: 1.25rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-radius: 0.5rem;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n resize: vertical;\n }\n\n .c3:focus {\n border: 1px solid #666;\n }\n\n .c3:focus::-webkit-input-placeholder {\n visibility: hidden;\n }\n\n .c3:focus::-moz-placeholder {\n visibility: hidden;\n }\n\n .c3:focus:-ms-input-placeholder {\n visibility: hidden;\n }\n\n .c3:focus::placeholder {\n visibility: hidden;\n }\n\n <label\n className=\"c0\"\n htmlFor=\"Please leave your comment here\"\n >\n <span\n className=\"c1 c2\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"Label\",\n }\n }\n size=\"s\"\n />\n <textarea\n aria-describedby=\"Please leave your comment here\"\n className=\"c3\"\n name=\"description\"\n placeholder=\"This is text area\"\n rows={5}\n />\n \n </label>\n ");
18
18
  });