1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-09-17 09:57:23 +03:00

Test out themes

This commit is contained in:
Brent Jackson 2019-03-09 16:38:31 -05:00
parent a20e2b378e
commit 2af123ecab
6 changed files with 19 additions and 5 deletions

View File

@ -1,4 +1,4 @@
export { big as theme } from '@mdx-deck/themes'
export { future as theme } from '@mdx-deck/themes'
import { Head, Image, Notes, Appear } from '@mdx-deck/components'
import { Invert, Split, SplitRight, FullScreenCode, Horizontal} from '@mdx-deck/layouts'
import Counter from './Counter'

View File

@ -10,7 +10,6 @@ import Overview from './Overview'
import Print from './Print'
import GoogleFonts from './GoogleFonts'
import Catch from './Catch'
import { default as defaultTheme } from '@mdx-deck/themes'
const NORMAL = 'normal'
const PRESENTER = 'presenter'
@ -249,13 +248,11 @@ export class MDXDeck extends React.Component {
MDXDeck.propTypes = {
slides: PropTypes.array.isRequired,
theme: PropTypes.object.isRequired,
headTags: PropTypes.array.isRequired,
}
MDXDeck.defaultProps = {
slides: [],
theme: defaultTheme,
headTags: [],
}

View File

@ -5,6 +5,7 @@ import { ThemeProvider } from 'emotion-theming'
import merge from 'lodash.merge'
import { HeadProvider } from './Head'
import { MDXProvider } from '@mdx-js/tag'
import defaultTheme from '@mdx-deck/themes'
import mdxComponents from './mdx-components'
const DefaultProvider = props => <>{props.children}</>
@ -18,7 +19,7 @@ const mergeThemes = themes =>
export const Provider = props => {
const { headTags, theme: baseTheme, themes = [] } = props
const theme = mergeThemes([baseTheme, ...themes])
const theme = mergeThemes([defaultTheme, baseTheme, ...themes])
const {
Provider: UserProvider = DefaultProvider,
components: themeComponents = {},

View File

@ -22,6 +22,7 @@ const themedCode = props => ({
'& code, & pre': {
fontFamily: props.theme.monospace,
color: props.theme.colors.code,
background: props.theme.colors.codeBackground,
},
})

View File

@ -4,6 +4,7 @@ export { default as future } from './future'
export { default as condensed } from './condensed'
export { default as yellow } from './yellow'
export { default as swiss } from './swiss'
export { default as poppins } from './poppins'
// serif
export { default as book } from './book'

View File

@ -0,0 +1,14 @@
export default {
font: '"Poppins", sans-serif',
googleFont: 'https://fonts.googleapis.com/css?family=Poppins:400,900',
heading: {
fontWeight: 900,
letterSpacing: '-0.05em',
},
blockquote: {
fontSize: '1.75em',
textAlign: 'left',
fontWeight: 900,
letterSpacing: '-0.05em',
},
}