Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
colorTextPrimary: {theme.colorTextPrimary}
<br>
fontFamily: {theme.fontFamily}
<br>
lineHeightText: {theme.lineHeightText}
<br>
);
// We're passing a default theme for Component that aren't wrapped in the ThemeProvider
ComponentWithTheme.defaultProps = {
theme: tokens,
};
// Themed component cannot be used without ThemeProvider
const ThemedComponent = withTheme(ComponentWithTheme);
ThemedComponent.displayName = "ThemedComponent";
export { ThemedComponent as default, ComponentWithTheme as RawComponent };
const customTheme = {
color: {
primary: "red",
secondary: "blue"
}
};
type CustomTheme = typeof customTheme;
interface DemoBoxProps {
text: string;
theme: CustomTheme;
}
const DemoBox = ({ text, theme }: DemoBoxProps) => {
return <div style="{{">{text}</div>;
};
const ThemedDemoBox = withTheme(DemoBox);
const renderDemoBox = () => ;
const App = () => {
return (
);
};
const AugmentedApp = () => {
return (
({ ...outerTheme, augmented: true })}>
import React from 'react'
import Base from '../src'
import { withTheme } from 'theming'
const Button = withTheme(({ theme, ...props }) =>