mirror of
https://github.com/jxnblk/mdx-deck.git
synced 2024-09-11 06:35:24 +03:00
Add Provider support
This commit is contained in:
parent
c1ff9717c1
commit
dad56aefd8
@ -1,7 +1,7 @@
|
||||
|
||||
# mdx-deck
|
||||
|
||||
Create presentation decks with [MDX][]
|
||||
[MDX][]-based presention decks
|
||||
|
||||
**Beta**
|
||||
|
||||
@ -107,12 +107,13 @@ TK
|
||||
|
||||
---
|
||||
|
||||
- [ ] Root provider
|
||||
- [ ] add default themes
|
||||
- [ ] theme docs
|
||||
- [ ] exporting docs
|
||||
- [ ] components docs
|
||||
- [ ] Full Image component
|
||||
- [ ] Provider docs
|
||||
- [x] Full Image component
|
||||
- [x] Root provider
|
||||
- [x] default styles
|
||||
- [x] export build
|
||||
- [x] URL hash
|
||||
|
@ -1,6 +1,5 @@
|
||||
import Layout from './Layout'
|
||||
import { Image } from '../src'
|
||||
// export { default as theme } from './theme'
|
||||
|
||||
# mdx-deck
|
||||
|
||||
|
16
lib/entry.js
16
lib/entry.js
@ -4,16 +4,20 @@ import SlideDeck from '../src'
|
||||
|
||||
const mod = require(DOC_FILENAME)
|
||||
const slides = mod.default
|
||||
const { theme, components } = mod
|
||||
const { theme, components, Provider } = mod
|
||||
|
||||
const Root = Provider || React.Fragment
|
||||
|
||||
export default class App extends React.Component {
|
||||
render () {
|
||||
return (
|
||||
<SlideDeck
|
||||
slides={slides}
|
||||
theme={theme}
|
||||
components={components}
|
||||
/>
|
||||
<Root>
|
||||
<SlideDeck
|
||||
slides={slides}
|
||||
theme={theme}
|
||||
components={components}
|
||||
/>
|
||||
</Root>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user