Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
;
// withStyleDeep()
// --------------------------
// Static Styles
const WithStyledDeepSimple = withStyleDeep(BasicStyled, { color: 'blue' });
;
// Dynamic Styles
interface WithStyledDeepDynamicProps {
$crushed: boolean;
}
const WithStyledDeepDynamic = withStyleDeep(BasicStyled, (props: WithStyledDeepDynamicProps) => ({
letterSpacing: props.$crushed ? '-5px' : '0',
}));
;
// withTransform()
// --------------------------
interface WithTransformTestProps {
$inline: boolean;
}
const WithTransformTest = withTransform(BasicStyled, (style, props: WithTransformTestProps) => {
const display = style.display === 'none' ? 'none' : props.$inline ? 'inline-flex' : 'flex';
return { ...styled, display };
});
// Dynamic Styles
interface WithStyledDynamicProps {
$crushed: boolean;
}
const WithStyledDynamic = withStyle(BasicStyled, (props: WithStyledDynamicProps) => ({
letterSpacing: props.$crushed ? '-5px' : '0',
}));
;
// withStyleDeep()
// --------------------------
// Static Styles
const WithStyledDeepSimple = withStyleDeep(BasicStyled, { color: 'blue' });
;
// Dynamic Styles
interface WithStyledDeepDynamicProps {
$crushed: boolean;
}
const WithStyledDeepDynamic = withStyleDeep(BasicStyled, (props: WithStyledDeepDynamicProps) => ({
letterSpacing: props.$crushed ? '-5px' : '0',
}));
;
// withTransform()
// --------------------------