Method
addSelector
(
selector: string,
name: Name,
populate: {label: string; desc: string}[],
defaultValue: SiteSettings[Name],
component = Select,
)
Source from the content-addressed store, hash-verified
| 324 | |
| 325 | private addSelectors() { |
| 326 | const addSelector = <Name extends keyof SiteSettings>( |
| 327 | selector: string, |
| 328 | name: Name, |
| 329 | populate: {label: string; desc: string}[], |
| 330 | defaultValue: SiteSettings[Name], |
| 331 | component = Select, |
| 332 | ) => { |
| 333 | const instance = new component(this.root.find(selector), name, populate); |
| 334 | this.add(instance, defaultValue); |
| 335 | return instance; |
| 336 | }; |
| 337 | |
| 338 | // We need theme data to populate the colour schemes; We don't add the selector until later |
| 339 | const themesData = keys(themes).map((theme: Themes) => { |
Callers
nothing calls this directly
Tested by
no test coverage detected