Add docfy for addon components (#27188)

* move script to scripts folder

* add docfy to router and scripts

* add docfy to router and scripts

* fix jsdoc syntax

* add component markdown files to gitignore

* improve error handling for scripts

* tidy up remaining jsdoc syntax

* add sample jsdoc components

* add known issue info

* make not using multi-line components clearer

* make generating docs clearer

* update copy

* final how to docfy cleanup

* fix ts file @module syntax

* fix read more syntax

* make docfy typescript compatible
This commit is contained in:
claire bontempo
2024-05-29 14:06:38 -07:00
committed by GitHub
parent fab2899508
commit e61bd967e3
70 changed files with 2932 additions and 512 deletions

View File

@@ -12,18 +12,17 @@
* - recalculates the time when the unit is changed by the user (eg 60s -> 1m)
*
* @example
* ```js
* <TtlPicker @onChange={{this.handleChange}} @initialEnabled={{@model.myAttribute}} @initialValue={{@model.myAttribute}}/>
* ```
* @param onChange {Function} - This function will be passed a TTL object, which includes enabled{bool}, seconds{number}, timeString{string}, goSafeTimeString{string}.
* @param initialEnabled=false {Boolean} - Set this value if you want the toggle on when component is mounted
* @param label="Time to live (TTL)" {String} - Label is the main label that lives next to the toggle. Yielded values will replace the label
* @param labelDisabled=Label to display when TTL is toggled off
* @param helperTextEnabled="" {String} - This helper text is shown under the label when the toggle is switched on
* @param helperTextDisabled="" {String} - This helper text is shown under the label when the toggle is switched off
* @param initialValue=null {string} - InitialValue is the duration value which will be shown when the component is loaded. If it can't be parsed, will default to 0.
* @param changeOnInit=false {boolean} - if true, calls the onChange hook when component is initialized
* @param hideToggle=false {Boolean} - set this value if you'd like to hide the toggle and just leverage the input field
*
* @param {function} onChange - This function will be passed a TTL object, which includes enabled{bool}, seconds{number}, timeString{string}, goSafeTimeString{string}.
* @param {boolean} initialEnabled=false - Set this value if you want the toggle on when component is mounted
* @param {string} label=Time to live (TTL) - Label is the main label that lives next to the toggle. Yielded values will replace the label
* @param {string} labelDisabled=Label to display when TTL is toggled off
* @param {string} helperTextEnabled - This helper text is shown under the label when the toggle is switched on
* @param {string} helperTextDisabled - This helper text is shown under the label when the toggle is switched off
* @param {string} initialValue=null - InitialValue is the duration value which will be shown when the component is loaded. If it can't be parsed, will default to 0.
* @param {boolean} changeOnInit=false - if true, calls the onChange hook when component is initialized
* @param {boolean} hideToggle=false - set this value if you'd like to hide the toggle and just leverage the input field
*/
import Component from '@glimmer/component';