Description
Describe Your Environment
What version of Spectacle are you using? (can be found by running npm list spectacle
)
What version of React are you using? (can be found by running npm list react
)
What browser are you using?
chrome (newest version)
What machine are you on?
macOS / macbook pro
Describe the Problem
When template
is used like
const template = () => (
<FlexBox
justifyContent="space-between"
position="absolute"
bottom={0}
width={1}
>
<Box padding="0 1em">
<FullScreen />
</Box>
<Box padding="1em">
<Progress />
</Box>
</FlexBox>
);
const App = () => (
<Deck theme={theme} template={template} transitionEffect="fade">
The problem is not visible in examples because <Progress />
has always the same shape and doesn't render as a glitch, but when you use something more dynamic like page numbers:
const template = ({ slideNumber, numberOfSlides }) => (
<FlexBox
justifyContent="space-between"
position="absolute"
bottom={0}
width="100%"
>
<Box padding="2">
<FullScreen />
</Box>
<Text fontSize="20px">
{slideNumber + 1} / {numberOfSlides}
</Text>
</FlexBox>
);
Then in ?exportMode=true
it will render that template as many times as slides, all of them on the 1st page.
Expected behavior: [What you expect to happen]
template() should be rendered on every slide in ?exportMode=true
Actual behavior: [What actually happens]
template() is rendered as many times as number of slides on the "1st page" in ?exportMode
.
Additional Information
N/A