Skip to content

Commit 592f30c

Browse files
timsnaddensapegin
authored andcommitted
Fix: Add theme color to components (styleguidist#418)
1 parent 6e86ab2 commit 592f30c

File tree

8 files changed

+24
-8
lines changed

8 files changed

+24
-8
lines changed

src/rsg-components/ComponentsList/ComponentsListRenderer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import cx from 'classnames';
44
import Link from 'rsg-components/Link';
55
import Styled from 'rsg-components/Styled';
66

7-
const styles = ({ font, small }) => ({
7+
const styles = ({ base, font, small }) => ({
88
list: {
99
margin: 0,
1010
paddingLeft: 15,
1111
},
1212
item: {
13+
color: base,
1314
display: 'block',
1415
margin: [[7, 0, 7, 0]],
1516
fontFamily: font,
@@ -25,6 +26,7 @@ const styles = ({ font, small }) => ({
2526
},
2627
},
2728
heading: {
29+
color: base,
2830
marginTop: 7,
2931
fontFamily: font,
3032
fontWeight: 'bold',

src/rsg-components/Heading/HeadingRenderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import PropTypes from 'prop-types';
33
import cx from 'classnames';
44
import Styled from 'rsg-components/Styled';
55

6-
export const styles = ({ link, linkHover }) => ({
6+
export const styles = ({ base, link, linkHover }) => ({
77
heading: {
8+
color: base,
89
position: 'relative',
910
overflow: 'visible',
1011
marginLeft: -30,

src/rsg-components/Logo/LogoRenderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import Styled from 'rsg-components/Styled';
44

5-
const styles = ({ font }) => ({
5+
const styles = ({ base, font }) => ({
66
logo: {
7+
color: base,
78
margin: 0,
89
fontFamily: font,
910
fontSize: 18,

src/rsg-components/Markdown/Markdown.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ const getInlineOverrides = memoize(classes => {
6565
};
6666
}, () => 'getInlineOverrides');
6767

68-
const styles = ({ font, monospace, link, linkHover, border, codeBackground }) => ({
68+
const styles = ({ base, font, monospace, link, linkHover, border, codeBackground }) => ({
6969
base: {
70+
color: base,
7071
fontFamily: font,
7172
fontSize: 'inherit',
7273
},
7374
para: {
75+
color: base,
7476
fontFamily: font,
7577
fontSize: 'inherit',
7678
margin: [[0, 0, 15, 0]],
@@ -125,6 +127,7 @@ const styles = ({ font, monospace, link, linkHover, border, codeBackground }) =>
125127
listStyleType: 'inherit',
126128
},
127129
input: {
130+
color: base,
128131
display: 'inline-block',
129132
margin: [[0, '0.35em', '0.25em', '-1.2em']],
130133
verticalAlign: 'middle',

src/rsg-components/Methods/MethodsRenderer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Styled from 'rsg-components/Styled';
66
import Group from 'react-group';
77
import cx from 'classnames';
88

9-
const styles = ({ font, border, light, name, type }) => ({
9+
const styles = ({ base, font, border, light, name, type }) => ({
1010
table: {
1111
width: '100%',
1212
borderCollapse: 'collapse',
@@ -19,13 +19,15 @@ const styles = ({ font, border, light, name, type }) => ({
1919
row: {
2020
},
2121
cell: {
22+
color: base,
2223
paddingRight: 15,
2324
paddingTop: 6,
2425
verticalAlign: 'top',
2526
fontFamily: font,
2627
fontSize: 13,
2728
},
2829
cellHeading: {
30+
color: base,
2931
paddingRight: 15,
3032
paddingBottom: 6,
3133
textAlign: 'left',

src/rsg-components/Playground/PlaygroundRenderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import Link from 'rsg-components/Link';
55
import Preview from 'rsg-components/Preview';
66
import Styled from 'rsg-components/Styled';
77

8-
const styles = ({ font, link, linkHover, border, baseBackground, codeBackground }) => ({
8+
const styles = ({ base, font, link, linkHover, border, baseBackground, codeBackground }) => ({
99
root: {
10+
color: base,
1011
position: 'relative',
1112
marginBottom: 30,
1213
border: [[1, border, 'solid']],

src/rsg-components/Props/PropsRenderer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Styled from 'rsg-components/Styled';
66
import Group from 'react-group';
77
import { unquote, getType, showSpaces } from './util';
88

9-
const styles = ({ font, border, light, lightest, name, type }) => ({
9+
const styles = ({ base, font, border, light, lightest, name, type }) => ({
1010
table: {
1111
width: '100%',
1212
borderCollapse: 'collapse',
@@ -19,13 +19,15 @@ const styles = ({ font, border, light, lightest, name, type }) => ({
1919
row: {
2020
},
2121
cell: {
22+
color: base,
2223
paddingRight: 15,
2324
paddingTop: 6,
2425
verticalAlign: 'top',
2526
fontFamily: font,
2627
fontSize: 13,
2728
},
2829
cellHeading: {
30+
color: base,
2931
paddingRight: 15,
3032
paddingBottom: 6,
3133
textAlign: 'left',
@@ -34,6 +36,7 @@ const styles = ({ font, border, light, lightest, name, type }) => ({
3436
fontSize: 13,
3537
},
3638
cellDesc: {
39+
color: base,
3740
width: '99%',
3841
paddingLeft: 15,
3942
},

src/rsg-components/ReactComponent/ReactComponentRenderer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Link from 'rsg-components/Link';
44
import Heading from 'rsg-components/Heading';
55
import Styled from 'rsg-components/Styled';
66

7-
const styles = ({ font, monospace, light }) => ({
7+
const styles = ({ base, font, monospace, light }) => ({
88
root: {
99
marginBottom: 50,
1010
fontSize: 16,
@@ -27,6 +27,7 @@ const styles = ({ font, monospace, light }) => ({
2727
transition: 'opacity ease-in-out .15s .2s',
2828
},
2929
primaryHeading: {
30+
color: base,
3031
position: 'relative',
3132
marginTop: 0,
3233
marginBottom: 7,
@@ -35,6 +36,7 @@ const styles = ({ font, monospace, light }) => ({
3536
fontWeight: 'normal',
3637
},
3738
heading: {
39+
color: base,
3840
margin: [[0, 0, 7]],
3941
fontFamily: font,
4042
fontSize: 20,
@@ -46,6 +48,7 @@ const styles = ({ font, monospace, light }) => ({
4648
fontSize: 14,
4749
},
4850
description: {
51+
color: base,
4952
marginBottom: 20,
5053
fontSize: 16,
5154
},

0 commit comments

Comments
 (0)