Skip to content

Slide Template seems broken #891

Open
@vork

Description

@vork

Question

Is changing templates per Slide currently broken or did I get it wrong? Version: 6.0.2

Background Info/Attempts

I've defined two master templates. One with page number and one without. For the introduction slide I want to switch to a simpler version.

Minimal Example:

const regularTemplate = ({ slideNumber, numberOfSlides }) => (
  <FlexBox
    justifyContent="space-between"
    position="absolute"
    bottom={0}
    width={1}
  >
    <Box margin={0, 2}>
      <FullScreen color="secondary" />
    </Box>
    <Box margin={0, 0, 0, 2}>
      {slideNumber} / {numberOfSlides}
    </Box>
  </FlexBox>
);

const introTemplate = () => (
  <FlexBox
    justifyContent="space-between"
    position="absolute"
    bottom={0}
    width={1}
  >
    <Box margin={0, 2} >
      <FullScreen color="secondary" />
    </Box>
  </FlexBox>
);

const Presentation = () => (
  <Deck template={regularTemplate}>
    <Slide template={introTemplate}>
      <Heading>Without Page Number</Heading>
    </Slide>
    <Slide>
      <Heading>Default: With Page Number</Heading>
    </Slide>
  </Deck >
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 BugIssues or PRs that report or fix a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions