Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(docs): icons in docs not rendered properly #1625

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4e88953
fix icons in docs not rendered properly
lucivpav Jul 12, 2019
10c7fef
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 12, 2019
c0dfefa
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 15, 2019
1e51da9
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 15, 2019
449df54
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 16, 2019
8372ad7
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 16, 2019
e66e4bc
update changelog
lucivpav Jul 16, 2019
f94f01c
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 16, 2019
39137b5
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 17, 2019
e994be7
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 18, 2019
6b1fbee
improve changelog
lucivpav Jul 19, 2019
e35d119
rework without styles
lucivpav Jul 26, 2019
2c7358a
remove unnecessary code
lucivpav Jul 26, 2019
718b016
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 26, 2019
857cffe
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 26, 2019
36ec625
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 29, 2019
2b3886a
Update CHANGELOG.md
lucivpav Jul 29, 2019
7da707a
Merge branch 'master' into docs/theming-icon-fix
lucivpav Jul 30, 2019
440c42b
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 1, 2019
72a0779
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 5, 2019
892eea1
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 9, 2019
5d189aa
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 9, 2019
1e3e2fd
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 12, 2019
8e3c2d7
remove value
lucivpav Aug 12, 2019
41d7c65
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 13, 2019
618b760
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 13, 2019
7dd5c47
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 13, 2019
9aa585b
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 13, 2019
fa251eb
Merge branch 'master' into docs/theming-icon-fix
lucivpav Aug 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Fix broken fragments on CodeSandbox @lucivpav ([#1655](https://github.com/stardust-ui/react/pull/1655))
- Improve a table with component props in docs @layershifter ([#1634](https://github.com/stardust-ui/react/pull/1634))
- Improve rendering performance for docs examples @Bugaa92 ([#1654](https://github.com/stardust-ui/react/pull/1654))
- Fix code in Component variables section of Theming page @lucivpav ([#1625](https://github.com/stardust-ui/react/pull/1625))

<!--------------------------------[ v0.34.1 ]------------------------------- -->
## [v0.34.1](https://github.com/stardust-ui/react/tree/v0.34.1) (2019-07-11)
Expand Down
63 changes: 60 additions & 3 deletions docs/src/views/Theming.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import * as React from 'react'
import { NavLink } from 'react-router-dom'
import { Button, Icon, Provider, Text, Animation, Header } from '@stardust-ui/react'
import {
Button,
Icon,
Provider,
Text,
Animation,
Header,
ComponentStyleFunctionParam,
} from '@stardust-ui/react'

import DocPage from '../components/DocPage/DocPage'
import ExampleSnippet from '../components/ExampleSnippet/ExampleSnippet'
import GuidesNavigationFooter from '../components/GuidesNavigationFooter'

type ThemingVariables = {
iconColor: string
}

export default () => (
<DocPage title="Theming">
<Header as="h2" content="Overview" />
Expand Down Expand Up @@ -87,7 +99,7 @@ export default () => (
render={() => (
<>
<Icon name="user" circular />
<Icon name="user" circular variables={{ color: 'cornflowerblue' }} />
<Icon name="user" circular styles={{ color: 'cornflowerblue' }} />
lucivpav marked this conversation as resolved.
Show resolved Hide resolved
</>
)}
/>
Expand All @@ -97,12 +109,57 @@ export default () => (
the <NavLink to="components/provider">Provider</NavLink>.
</p>
<ExampleSnippet
value={`
lucivpav marked this conversation as resolved.
Show resolved Hide resolved
<>
<Icon name="user" circular />
<Icon name="user" circular />

<Provider
theme={{
componentVariables: {
Icon: {
iconColor: 'cornflowerblue'
}
},
componentStyles: {
lucivpav marked this conversation as resolved.
Show resolved Hide resolved
Icon: {
root: ({variables: v, props: p }) => ({
...({color: v.iconColor})
})
}
}
}}>
<span>
<Icon name="user" circular />
<Icon name="user" circular />
</span>
</Provider>
</>
`}
render={() => (
<>
<Icon name="user" circular />
<Icon name="user" circular />

<Provider theme={{ componentVariables: { Icon: { color: 'cornflowerblue' } } }}>
<Provider
theme={{
componentVariables: {
Icon: {
iconColor: 'cornflowerblue',
},
},
componentStyles: {
Icon: {
root: ({
variables: v,
props: p,
}: ComponentStyleFunctionParam<any, ThemingVariables>) => ({
...{ color: v.iconColor },
}),
},
},
}}
>
<span>
<Icon name="user" circular />
<Icon name="user" circular />
Expand Down