-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
82 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// import React from 'react'; | ||
// import scStyled, { StyledInterface } from 'styled-components'; | ||
// import { Component, theme, parsers, Style, Theme } from '@morfeo/web'; | ||
|
||
// const customStyled = (tag: keyof StyledInterface) => { | ||
// const callback = <P extends Style & { theme: Theme }>({ | ||
// 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<Style>; | ||
|
||
// return <Component {...props} />; | ||
// }; | ||
// } | ||
|
||
// export default customStyled; | ||
|
||
export const TEST = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters