Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
error={error.where === '__compiler' ? error.msg : null}
code={state.code}
/>
({
flexWrap: 'wrap',
marginTop: $theme.sizing.scale300,
}),
},
}}
>
<button kind="{KIND.tertiary}"> {
trackEvent('yard', `${componentName}:format_code`);
updateCode(dispatch, formatCode(state.code));
}}
>
{' '}
Format
</button>
<button kind="{KIND.tertiary}"> {
trackEvent('yard', `${componentName}:copy_code`);
copy(state.code);
}}</button>
onClick={() => {
copy(state.code);
}}
>
Copy code
<button kind="{KIND.tertiary}"> {
copy(window.location.href);
}}
>
Copy URL
</button>
<button kind="{KIND.tertiary}"> {
reset(
dispatch,
getCode(
propsConfig,
componentName,
getThemeForCodeGenerator(themeConfig, {}, theme),
importsConfig
),
propsConfig,
initialThemeObj
);
//updateUrl({ pathname })
}}
>
Reset</button>
label: i + 1,
}))}
onItemSelect={({item}) => {
handleLimitChange(item.label);
close();
}}
overrides={{
List: {
style: {height: '150px', width: '100px'},
},
}}
/>
)}
placement={PLACEMENT.bottom}
>
<button kind="{KIND.tertiary}">
{`${limit} Rows`}
</button>
handlePageChange(nextPage)}
/>
);
}
<div>
</div>
{filteredKnobNames.length !== allKnobNames.length && (
<button size="{SIZE.compact}" kind="{KIND.tertiary}"> setShowAllKnobs(!showAllKnobs)}
>
{showAllKnobs ? 'Show only basic props' : 'Show all props'}
</button>
)}
);
};
label: i + 1,
}))}
onItemSelect={({item}) => {
handleLimitChange(item.label);
close();
}}
overrides={{
List: {
style: {height: '150px', width: '100px'},
},
}}
/>
)}
placement={PLACEMENT.bottom}
>
<button kind="{KIND.tertiary}">
{`${limit} Rows`}
</button>
handlePageChange(nextPage)}
/>
);
}
<button kind="{KIND.tertiary}"> {
set({
...overrides.value,
[overrideKey]: {
style: formatCode(overrides.value[overrideKey].style),
active: true,
},
});
}}
>
Format
</button>
<button kind="{KIND.tertiary}"> {
const newCode = formatCode(
toggleOverrideSharedProps(
overrides.value[overrideKey].style,
Object.keys(overrides.custom.sharedProps)
)
);
set({
...overrides.value,
[overrideKey]: {
style: newCode,
active: true,
},
});
}}
></button>
/>
({
marginTop: $theme.sizing.scale300,
[`@media screen and (max-width: ${$theme.breakpoints.medium}px)`]: {
flexWrap: 'wrap',
},
}),
},
}}
>
<button kind="{KIND.tertiary}"> {
set({
...overrides.value,
[overrideKey]: {
style: formatCode(overrides.value[overrideKey].style),
active: true,
},
});
}}
>
Format
</button>
<button kind="{KIND.tertiary}"> {
const newCode = formatCode(</button>
{filteredKnobNames.length !== allKnobNames.length && (
<button size="{SIZE.compact}" kind="{KIND.tertiary}"> setShowAllKnobs(!showAllKnobs)}
>
{showAllKnobs ? 'Show only basic props' : 'Show all props'}
</button>
)}
);
};
<button kind="{KIND.tertiary}"> {
set({
...overrides.value,
[overrideKey]: {
style: formatCode(overrides.value[overrideKey].style),
active: true,
},
});
}}
>
Format
</button>
<button kind="{KIND.tertiary}"> {
const newCode = formatCode(
toggleOverrideSharedProps(
overrides.value[overrideKey].style,
Object.keys(overrides.sharedProps)
)
);
set({
...overrides.value,
[overrideKey]: {
style: newCode,
active: true,
},
});
}}
></button>