Skip to content

Commit

Permalink
feat(docz-theme-default): add blockquote component
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Sep 2, 2018
1 parent f483638 commit 86ada87
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/docz-theme-default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ const config = {
codeBg: colors.grayExtraLight,
codeColor: colors.gray,
preBg: colors.grayExtraLight,
blockquoteBg: colors.grayExtraLight,
blockquoteBorder: colors.grayLight,
blockquoteColor: colors.gray,
},
/**
* Styles
Expand Down Expand Up @@ -173,6 +176,12 @@ const config = {
fontFamily: '"Source Code Pro", monospace',
fontSize: 14,
},
blockquote: {
margin: '25px 0',
padding: '20px',
fontStyle: 'italic',
fontSize: 18,
},
}
}
```
13 changes: 13 additions & 0 deletions packages/docz-theme-default/src/components/ui/Blockquote.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import styled from 'react-emotion'

export const Blockquote = styled('blockquote')`
background: ${p => p.theme.docz.colors.blockquoteBg};
border-left: 5px solid ${p => p.theme.docz.colors.blockquoteBorder};
color: ${p => p.theme.docz.colors.blockquoteColor};
${p => p.theme.docz.styles.blockquote};
& > p {
margin: 0;
color: ${p => p.theme.docz.colors.blockquoteColor};
}
`
1 change: 1 addition & 0 deletions packages/docz-theme-default/src/components/ui/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export { H3 } from './H3'
export { H4 } from './H4'
export { H5 } from './H5'
export { H6 } from './H6'
export { Blockquote } from './Blockquote'
export { InlineCode } from './InlineCode'
export { Link } from './Link'
export { List } from './List'
Expand Down
1 change: 1 addition & 0 deletions packages/docz-theme-default/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const Theme = () => (
page: components.Page,
notFound: components.NotFound,
render: components.Render,
blockquote: components.Blockquote,
h1: components.H1,
h2: components.H2,
h3: components.H3,
Expand Down
6 changes: 6 additions & 0 deletions packages/docz-theme-default/src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,10 @@ export const styles = {
fontFamily: '"Source Code Pro", monospace',
fontSize: 14,
},
blockquote: {
margin: '25px 0',
padding: '20px',
fontStyle: 'italic',
fontSize: 18,
},
}
6 changes: 6 additions & 0 deletions packages/docz-theme-default/src/styles/modes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export const light = {
codeBg: lighten(0.02, colors.grayExtraLight),
codeColor: colors.gray,
preBg: colors.grayExtraLight,
blockquoteBg: colors.grayExtraLight,
blockquoteBorder: colors.grayLight,
blockquoteColor: colors.gray,
}

export const dark = {
Expand All @@ -39,4 +42,7 @@ export const dark = {
codeBg: colors.gray,
codeColor: colors.grayExtraLight,
preBg: colors.grayDark,
blockquoteBg: colors.grayDark,
blockquoteBorder: colors.gray,
blockquoteColor: colors.gray,
}

0 comments on commit 86ada87

Please sign in to comment.