@comicrelief/storybook 2.4.1 → 2.5.0

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/storybook",
3
3
  "description": "React components to build the Comic Relief front-end experience",
4
- "version": "2.4.1",
4
+ "version": "2.5.0",
5
5
  "dependencies": {
6
6
  "@snyk/protect": "^1.1060.0",
7
7
  "@storybook/addon-info": "3",
@@ -30,6 +30,7 @@ export default {
30
30
  id: 'postConsent',
31
31
  text: 'Send me post',
32
32
  name: 'Post',
33
+ additionalFieldGroupInfo: '',
33
34
  options: [
34
35
  {
35
36
  label: 'Post',
@@ -159,10 +159,14 @@ class MarketingConsentCheckbox extends Component {
159
159
  const bgStyle = 'form__field--background';
160
160
  const customMessage = typeof item.customMessage !== 'undefined' ? item.customMessage : null;
161
161
  const subFieldShowing = !(this.state.checkboxValidation[checkbox].isFieldsHidden);
162
+ const additionalFieldGroupInfo = typeof item.additionalFieldGroupInfo !== 'undefined' ? item.additionalFieldGroupInfo : null;
162
163
 
163
164
  return (
164
165
  <div key={item.id} className={`form__field--wrapper form__field-wrapper--checkbox form__field-wrapper--background form__field-wrapper--${item.name} ${(subFieldShowing ? 'showing' : '')}`}>
165
166
  <p className="form__fieldset--label" aria-label={`Can we contact you by ${item.name}?`}>{item.text}</p>
167
+
168
+ { additionalFieldGroupInfo && <p className="form__fieldset--additional-info">{additionalFieldGroupInfo}</p> }
169
+
166
170
  { customMessage && <p>{customMessage}</p> }
167
171
  <div id={`field-wrapper--${item.name}`} className="form__field--wrapper" >
168
172
  {