diff --git a/apps/web-sandbox/package.json b/apps/web-sandbox/package.json
index fb8f818b..1feb4b2d 100644
--- a/apps/web-sandbox/package.json
+++ b/apps/web-sandbox/package.json
@@ -13,13 +13,13 @@
"@types/react": "^17.0.3",
"@types/react-dom": "^17.0.3",
"react-scripts": "4.0.3",
- "styled-components": "^5.2.3",
"web-vitals": "^1.1.1",
"typescript": "^4.2.4"
},
"peerDependencies": {
"react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "react-dom": "^17.0.2",
+ "styled-components": "^5.2.3"
},
"scripts": {
"start": "react-scripts start",
diff --git a/apps/web-sandbox/src/App.tsx b/apps/web-sandbox/src/App.tsx
index 2aa38ced..30c45227 100644
--- a/apps/web-sandbox/src/App.tsx
+++ b/apps/web-sandbox/src/App.tsx
@@ -7,6 +7,7 @@ const lightTheme = {
colors: {
primary: 'white',
secondary: 'black',
+ danger: 'red',
},
radii: {
m: '10px',
@@ -39,7 +40,7 @@ const lightTheme = {
height: 'm',
width: 'm',
bg: {
- md: 'red',
+ md: 'danger',
lg: 'primary',
},
color: 'secondary',
@@ -111,6 +112,16 @@ const StyledProvider: React.FC = ({ children }) => {
return {getStyle('Button')}
+ {getStyle('Button', 'primary')}
+ {getStyle('Button', 'round')}
+
({ +// theme: styledTheme, +// ...style +// }: P) => scStyled[tag](parsers.resolve({ style })); + +// const styledKeys = Object.keys(scStyled) as (keyof StyledInterface)[]; + +// for (let tag of styledKeys) { +// callback[tag] = callback(tag); +// } + +// return callback; +// }; + +// export function themeComponent(component: Component) { +// const { components } = theme.get(); +// const config = components[component]; +// const tag = config.style.componentTag || component; + +// return (props: Style = {}) => { +// const variant = props.variant; +// const variantTag = +// variant && config.variants ? config.variants[variant].componentTag : tag; + +// const Component = customStyled(variantTag || tag) as React.FC