-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from matheusps/feature/color-theory
Feature/color theory
- Loading branch information
Showing
19 changed files
with
176 additions
and
161 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
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 |
---|---|---|
@@ -1,11 +1,17 @@ | ||
Buttons | ||
Sizes | ||
|
||
```js | ||
<Button size="sm">Stellar</Button> | ||
|
||
<Button size="md" color="secondary">Stellar</Button> | ||
<Button size="sm">Button SM</Button> | ||
<Button size="md">Button MD</Button> | ||
<Button size="lg">Button LG</Button> | ||
<Button size="xl">Button XL</Button> | ||
``` | ||
|
||
<Button size="lg" color="success">Stellar</Button> | ||
Colors | ||
|
||
<Button size="xl">Stellar</Button> | ||
```js | ||
<Button appearance="default">Button</Button> | ||
<Button appearance="primary">Button</Button> | ||
<Button appearance="success">Button</Button> | ||
<Button appearance="warning">Button</Button> | ||
``` |
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 |
---|---|---|
@@ -1,26 +1,33 @@ | ||
import React, { FunctionComponent } from 'react' | ||
import styled from 'styled-components' | ||
import { selectTheme } from '../../global/helpers' | ||
import { selectTextAppearance, selectUIAppearance } from '../../global/helpers' | ||
|
||
interface Props extends EnhancedWithTheme {} | ||
|
||
const Div = styled.div<EnhancedWithTheme>` | ||
background-color: ${props => | ||
selectTheme(props.theme, props.color, props.shade)}; | ||
selectUIAppearance(props.theme, props.appearance, props.tone)}; | ||
color: ${props => selectTextAppearance(props.theme, props.text, props.tone)}; | ||
padding: 1rem; | ||
` | ||
|
||
const Container: FunctionComponent<Props> = ({ color, shade, children }) => { | ||
const Container: FunctionComponent<Props> = ({ | ||
appearance, | ||
tone, | ||
text, | ||
children, | ||
}) => { | ||
return ( | ||
<Div color={color} shade={shade}> | ||
<Div appearance={appearance} tone={tone} text={text}> | ||
{children} | ||
</Div> | ||
) | ||
} | ||
|
||
Container.defaultProps = { | ||
color: 'primary', | ||
shade: 'lighten', | ||
appearance: 'base', | ||
tone: 'basic', | ||
text: 'display', | ||
} | ||
|
||
export default Container |
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 |
---|---|---|
@@ -1,12 +1,8 @@ | ||
Loader colors | ||
Colors | ||
|
||
```js | ||
|
||
<Loader /> | ||
<Loader shade='lighten' /> | ||
<Loader shade='darken' /> | ||
|
||
<Loader color='secondary' /> | ||
<Loader color='success' /> | ||
|
||
<Loader color='primary' tone='light' /> | ||
<Loader color='primary' tone='basic' /> | ||
<Loader color='primary' tone='dark' /> | ||
<Loader color='default' /> | ||
``` |
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
Oops, something went wrong.