@chakra-ui/react#PopoverFooter JavaScript Examples

The following examples show how to use @chakra-ui/react#PopoverFooter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: onboarding.js    From idena-web with MIT License 5 votes vote down vote up
export function OnboardingPopoverContent({
  title,
  additionFooterActions,
  children,
  onDismiss,
  ...props
}) {
  const {t} = useTranslation()

  return (
    <PopoverContent
      bg="blue.500"
      border="none"
      color="white"
      px={3}
      py={2}
      zIndex="popover"
      {...props}
    >
      <PopoverArrow bg="blue.500" boxShadow="none !important" />
      <Box p={2}>
        <Stack spacing={3}>
          <PopoverHeader
            borderBottom="none"
            fontWeight={500}
            fontSize="md"
            p={0}
            mb={0}
          >
            {title}
          </PopoverHeader>
          <PopoverBody fontSize="sm" p={0}>
            {children}
          </PopoverBody>
          <PopoverFooter as={Stack} border="none" p={0}>
            <Stack isInline spacing={6} justify="flex-end">
              {additionFooterActions}
              <Button variant="unstyled" onClick={onDismiss}>
                {t('Okay, got it')}
              </Button>
            </Stack>
          </PopoverFooter>
        </Stack>
      </Box>
    </PopoverContent>
  )
}