@comicrelief/storybook 2.5.0 → 2.5.2

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.5.0",
4
+ "version": "2.5.2",
5
5
  "dependencies": {
6
6
  "@snyk/protect": "^1.1060.0",
7
7
  "@storybook/addon-info": "3",
@@ -38,6 +38,7 @@ export default {
38
38
  name: 'permissionPost',
39
39
  hideFields: false,
40
40
  extraInfo: 'Please confirm the address we will use to <b>post</b> to you:',
41
+ disabled: false,
41
42
  },
42
43
  ],
43
44
  field: [
@@ -171,7 +171,7 @@ class MarketingConsentCheckbox extends Component {
171
171
  <div id={`field-wrapper--${item.name}`} className="form__field--wrapper" >
172
172
  {
173
173
  item.options.map(option => (
174
- <div key={option.value} className="form__field--wrapper form__checkbox form__checkbox--inline form__checkbox--inline-2-horizontal">
174
+ <div key={option.value} className={`form__field--wrapper form__checkbox form__checkbox--inline form__checkbox--inline-2-horizontal ${option.disabled && 'disabled'}`}>
175
175
  <label className="form__field-label required" htmlFor={`field-label--${option.label}--${item.name}`} aria-label={`Can we contact you by ${item.name}?`}>
176
176
  {option.label}
177
177
  </label>
@@ -179,7 +179,7 @@ class MarketingConsentCheckbox extends Component {
179
179
  <input
180
180
  type="checkbox"
181
181
  id={`field-label--${option.label}--${item.name}`}
182
- className="form__field form__field--checkbox"
182
+ className={'form__field form__field--checkbox'}
183
183
  name={option.name}
184
184
  value={option.value}
185
185
  onChange={e => this.handleCheckboxToggle(item, option, e)}
@@ -187,6 +187,7 @@ class MarketingConsentCheckbox extends Component {
187
187
  ariarole="checkbox"
188
188
  aria-label={`field-label--${option.label}--${item.name}`}
189
189
  aria-checked={this.state.checkboxValidation[checkbox].value === option.value}
190
+ disabled={option.disabled}
190
191
  />
191
192
  <span />
192
193
  </div>