MCPcopy Create free account
hub / github.com/adobe/leonardo / createOutputParameters

Function createOutputParameters

docs/ui/src/js/createOutputParameters.js:23–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21const outputFormatPicker = document.getElementById('colorOutputFormat');
22
23function createOutputParameters() {
24 const outputFormat = outputFormatPicker.value;
25 const update = Promise.resolve((_theme.output = outputFormat));
26
27 update.then(() => {
28 createJSOutput();
29 createCSSOutput();
30 createTokensOutput();
31
32 // Reset to hex so all other functions of the UI continue to work.
33 // Otherwise CSS Module 4 formatted colors won't be parsed by Chroma.js
34 _theme.output = 'HEX';
35 });
36}
37
38function createJSOutput() {
39 let paramsOutput = document.getElementById('themeJSParams');

Callers 5

sliderInputFunction · 0.90
ratioUpdateFunction · 0.90
themeUpdateFunction · 0.90

Calls 3

createJSOutputFunction · 0.85
createCSSOutputFunction · 0.85
createTokensOutputFunction · 0.85

Tested by

no test coverage detected