Skip to content

Commit 79eae4a

Browse files
authored
v0.1.6
2 parents fed0a40 + 2da74a8 commit 79eae4a

25 files changed

+316
-33
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@channel.io/design-system",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "Design System by Channel",
55
"repository": {
66
"type": "git",

src/components/Icon/Icon.stories.tsx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { withKnobs, select, color, number } from '@storybook/addon-knobs'
44
import styled from 'styled-components'
55

66
/* Internal dependencies */
7-
import Pallette from '../../styling/Palette'
7+
import { Text } from '../Text'
8+
import { ThemeProvider, LightTheme } from '../../styling/Theme'
9+
import Palette from '../../styling/Palette'
810
import icons, { IconName } from './generated'
911
import Icon from './Icon'
1012

@@ -38,10 +40,10 @@ const Name = styled.p`
3840

3941
export const AllIcons = () => {
4042
const size = select('size', IconSize, IconSize.Normal)
41-
const selectedColor = color('color', Pallette.grey700)
43+
const selectedColor = color('color', Palette.grey700)
4244

4345
return (
44-
<>
46+
<ThemeProvider theme={LightTheme}>
4547
{ iconList.map((iconName) => (
4648
<IconInfo key={iconName}>
4749
<Icon
@@ -52,14 +54,14 @@ export const AllIcons = () => {
5254
<Name>{ iconName }</Name>
5355
</IconInfo>
5456
)) }
55-
</>
57+
</ThemeProvider>
5658
)
5759
}
5860

5961
export const Primary = () => (
6062
<Icon
6163
name={select('name', iconList, 'zoyi') as IconName}
62-
color={color('color', Pallette.grey700)}
64+
color={color('color', Palette.grey700)}
6365
size={select('size', IconSize, IconSize.Normal)}
6466
marginTop={number('marginTop', 0)}
6567
marginRight={number('marginRight', 0)}
@@ -69,16 +71,19 @@ export const Primary = () => (
6971
)
7072

7173
export const WithText = () => (
72-
<h1>
74+
<Text
75+
style={{
76+
color: color('color', Palette.grey700),
77+
}}
78+
>
7379
<Icon
7480
name={select('name', iconList, 'zoyi') as IconName}
75-
color={color('color', Pallette.grey700)}
7681
size={select('size', IconSize, IconSize.Normal)}
7782
marginTop={number('marginTop', 0)}
7883
marginRight={number('marginRight', 0)}
7984
marginBottom={number('marginBottom', 0)}
8085
marginLeft={number('marginLeft', 0)}
8186
/>
8287
Hello World!
83-
</h1>
88+
</Text>
8489
)

src/components/Icon/Icon.styled.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function getMargin({
1414
}
1515

1616
const Icon = styled.svg<IconStyledProps>`
17-
fill: ${props => props.color || props.theme?.colors?.iconBase};
17+
color: ${props => props.color || 'inherit'};
1818
margin: ${getMargin};
1919
`
2020

Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
3+
function SvgCloseWin(props: React.SVGProps<SVGSVGElement>) {
4+
return (
5+
<svg width="1em" height="1em" viewBox="0 0 24 24" {...props}>
6+
<path
7+
fill="#A7A7AA"
8+
fillRule="evenodd"
9+
d="M16.5 6.793l.707.707-4.5 4.5 4.5 4.5-.707.707-4.5-4.5-4.5 4.5-.707-.707 4.5-4.5-4.5-4.5.707-.707 4.5 4.5 4.5-4.5z"
10+
/>
11+
</svg>
12+
)
13+
}
14+
15+
export default SvgCloseWin
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
3+
function SvgEnlargeWin(props: React.SVGProps<SVGSVGElement>) {
4+
return (
5+
<svg width="1em" height="1em" viewBox="0 0 24 24" {...props}>
6+
<path
7+
fill="#A7A7AA"
8+
fillRule="evenodd"
9+
d="M17 7v10H7V7h10zm-1 1H8v8h8V8z"
10+
/>
11+
</svg>
12+
)
13+
}
14+
15+
export default SvgEnlargeWin

0 commit comments

Comments
 (0)