Skip to content

Commit

Permalink
Fix missing component data fields + JSDoc properties
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Jun 16, 2023
1 parent ec99d20 commit ebb53e6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export const params = [
{
name: 'html',
type: 'string',
required: true,
description: 'The HTML to reveal when the checkbox is checked'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export const params = [
{
name: 'html',
type: 'string',
required: true,
description: 'The HTML to reveal when the radio is checked'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export const params = [
{
name: 'key.html',
type: 'string',
required: true
required: true,
description:
'If `text` is set, this is not required. HTML to use within the each key. If `html` is provided, the `text` option will be ignored.'
},
{
name: 'key.classes',
Expand Down
14 changes: 8 additions & 6 deletions shared/lib/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ module.exports = {
}

/**
* Component data from YAML
* Component data
*
* @typedef {object} ComponentData
* @property {ComponentOption[]} [params] - Nunjucks macro options
* @property {ComponentExample[]} [examples] - Example Nunjucks macro options
* @property {ComponentOption[]} params - Nunjucks macro options (or params)
* @property {ComponentExample[]} examples - Examples of Nunjucks macro options (or params)
* @property {string} [previewLayout] - Nunjucks layout for component preview
* @property {string} [accessibilityCriteria] - Accessibility criteria
*/

/**
* Component option from YAML
* Nunjucks macro option (or param)
*
* @typedef {object} ComponentOption
* @property {string} name - Option name
Expand All @@ -111,10 +111,12 @@ module.exports = {
*/

/**
* Component example from YAML
* Example of Nunjucks macro options (or params)
*
* @typedef {object} ComponentExample
* @property {string} name - Example name
* @property {object} data - Example data
* @property {string} [description] - Example description
* @property {string[]} [previewLayoutModifiers] - Component preview layout class modifiers
* @property {boolean} [hidden] - Example hidden from review app
* @property {object} data - Example data
*/

0 comments on commit ebb53e6

Please sign in to comment.