Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 86ada87

Browse files
committed
feat(docz-theme-default): add blockquote component
1 parent f483638 commit 86ada87

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed

packages/docz-theme-default/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ const config = {
105105
codeBg: colors.grayExtraLight,
106106
codeColor: colors.gray,
107107
preBg: colors.grayExtraLight,
108+
blockquoteBg: colors.grayExtraLight,
109+
blockquoteBorder: colors.grayLight,
110+
blockquoteColor: colors.gray,
108111
},
109112
/**
110113
* Styles
@@ -173,6 +176,12 @@ const config = {
173176
fontFamily: '"Source Code Pro", monospace',
174177
fontSize: 14,
175178
},
179+
blockquote: {
180+
margin: '25px 0',
181+
padding: '20px',
182+
fontStyle: 'italic',
183+
fontSize: 18,
184+
},
176185
}
177186
}
178187
```
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import styled from 'react-emotion'
2+
3+
export const Blockquote = styled('blockquote')`
4+
background: ${p => p.theme.docz.colors.blockquoteBg};
5+
border-left: 5px solid ${p => p.theme.docz.colors.blockquoteBorder};
6+
color: ${p => p.theme.docz.colors.blockquoteColor};
7+
${p => p.theme.docz.styles.blockquote};
8+
9+
& > p {
10+
margin: 0;
11+
color: ${p => p.theme.docz.colors.blockquoteColor};
12+
}
13+
`

packages/docz-theme-default/src/components/ui/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export { H3 } from './H3'
44
export { H4 } from './H4'
55
export { H5 } from './H5'
66
export { H6 } from './H6'
7+
export { Blockquote } from './Blockquote'
78
export { InlineCode } from './InlineCode'
89
export { Link } from './Link'
910
export { List } from './List'

packages/docz-theme-default/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const Theme = () => (
1919
page: components.Page,
2020
notFound: components.NotFound,
2121
render: components.Render,
22+
blockquote: components.Blockquote,
2223
h1: components.H1,
2324
h2: components.H2,
2425
h3: components.H3,

packages/docz-theme-default/src/styles/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,10 @@ export const styles = {
6262
fontFamily: '"Source Code Pro", monospace',
6363
fontSize: 14,
6464
},
65+
blockquote: {
66+
margin: '25px 0',
67+
padding: '20px',
68+
fontStyle: 'italic',
69+
fontSize: 18,
70+
},
6571
}

packages/docz-theme-default/src/styles/modes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export const light = {
1919
codeBg: lighten(0.02, colors.grayExtraLight),
2020
codeColor: colors.gray,
2121
preBg: colors.grayExtraLight,
22+
blockquoteBg: colors.grayExtraLight,
23+
blockquoteBorder: colors.grayLight,
24+
blockquoteColor: colors.gray,
2225
}
2326

2427
export const dark = {
@@ -39,4 +42,7 @@ export const dark = {
3942
codeBg: colors.gray,
4043
codeColor: colors.grayExtraLight,
4144
preBg: colors.grayDark,
45+
blockquoteBg: colors.grayDark,
46+
blockquoteBorder: colors.gray,
47+
blockquoteColor: colors.gray,
4248
}

0 commit comments

Comments
 (0)