Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog.Footer missing from React Lib #849

Open
maybebansky opened this issue Aug 28, 2024 · 0 comments
Open

Dialog.Footer missing from React Lib #849

maybebansky opened this issue Aug 28, 2024 · 0 comments

Comments

@maybebansky
Copy link

According to the docs and storybook the Dialog should have a footer sub component: https://primer.style/react/storybook/?path=/story/components-dialog-features--repro-multistep-dialog-with-conditional-footer&globals=colorScheme:light

image

However this doenst seem to work:

import { Dialog, Box, Button, Textarea, FormControl } from "@primer/react";

export const Modal = () => {
  const handleSave = async () => {};

  return (
    <Dialog isOpen={true} onDismiss={() => {}} aria-labelledby="header">
      <Box>
        <Dialog.Header id="header">Header</Dialog.Header>

        <Box p={3}>
          <Box as="form">
            <FormControl>
              <FormControl.Label>Label</FormControl.Label>
              <Textarea name="value" block={true} />
            </FormControl>
          </Box>
          <Dialog.Footer>
            <Button variant="primary">Submit</Button>
          </Dialog.Footer>
        </Box>
      </Box>
    </Dialog>
  );
};

export default function Demo() {
  return (
    <Box p={20}>
      <Modal />
    </Box>
  );
}
error TS2339: Property 'Footer' does not exist on type 'ForwardRefExoticComponent<Omit<any, "ref"> & RefAttributes<HTMLDivElement>> & { Header: typeof DialogHeader; }'.

49           <Dialog.Footer

https://codesandbox.io/p/devbox/upbeat-wind-forked-jvjsty?file=%2Fsrc%2FDummy.tsx%3A1%2C1-34%2C1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant