1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

32 lines
741 B
JavaScript
Raw Normal View History

import * as React from "react";
2020-01-17 02:50:57 -07:00
import { Button, Flex } from "@chakra-ui/core";
import { motion } from "framer-motion";
const AnimatedFlex = motion.custom(Flex);
2020-05-02 16:09:03 -07:00
const FooterButton = React.forwardRef(
({ onClick, side, children, ...props }, ref) => {
2020-01-17 02:50:57 -07:00
return (
2020-05-02 16:09:03 -07:00
<AnimatedFlex
p={0}
w="auto"
ref={ref}
flexGrow={0}
float={side}
flexShrink={0}
maxWidth="100%"
flexBasis="auto"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.6 }}
>
<Button size="xs" variant="ghost" onClick={onClick} {...props}>
{children}
</Button>
</AnimatedFlex>
2020-01-17 02:50:57 -07:00
);
2020-05-02 16:09:03 -07:00
}
);
export default FooterButton;