AmaneSerenetia 1104b76e46 first commit
2024-01-22 20:52:38 +09:00

47 lines
1.3 KiB
TypeScript

import { motion, MotionProps } from 'framer-motion';
import {
Box,
BoxProps,
Button,
ButtonProps,
Flex,
FlexProps,
Stack,
VStack,
HStack,
StackProps,
Image,
ImageProps,
Text,
TextProps
} from '@chakra-ui/react';
import NextImage, { ImageProps as NextImageProps } from 'next/image';
import { SVGProps } from 'react';
export const MotionBox = motion<
Omit<BoxProps, keyof MotionProps> & MotionProps
>(Box as any);
export const MotionFlex = motion<
Omit<FlexProps, keyof MotionProps> & MotionProps
>(Flex as any);
export const MotionStack = motion<
Omit<StackProps, keyof MotionProps> & MotionProps
>(Stack as any);
export const MotionVStack = motion<
Omit<StackProps, keyof MotionProps> & MotionProps
>(VStack as any);
export const MotionHStack = motion<
Omit<StackProps, keyof MotionProps> & MotionProps
>(HStack as any);
export const MotionButton = motion<
Omit<ButtonProps, keyof MotionProps> & MotionProps
>(Button as any);
export const MotionImage = motion<
Omit<ImageProps, keyof MotionProps> & MotionProps
>(Image as any);
export const MotionText = motion<
Omit<TextProps, keyof MotionProps> & MotionProps
>(Text as any);
export const MotionNextImage = motion<
Omit<NextImageProps, keyof MotionProps> & MotionProps
>(NextImage as any);