diff --git a/pkgs/frontend/app/components/CommonButton.tsx b/pkgs/frontend/app/components/CommonButton.tsx new file mode 100644 index 0000000..337cab6 --- /dev/null +++ b/pkgs/frontend/app/components/CommonButton.tsx @@ -0,0 +1,32 @@ +import { Button, ButtonProps } from "~/components/ui/button"; + +interface CommonButtonProps extends Omit { + children: React.ReactNode; + width?: "full" | number; + size?: "sm" | "md" | "lg"; + backgroundColor?: string; + color?: string; +} + +export const CommonButton = ({ + children, + width = "full", + size = "md", + backgroundColor, + color, + ...props +}: CommonButtonProps) => { + return ( + + ); +}; + +export default CommonButton; diff --git a/pkgs/frontend/app/routes/_index.tsx b/pkgs/frontend/app/routes/_index.tsx index 3e050f4..fef0165 100644 --- a/pkgs/frontend/app/routes/_index.tsx +++ b/pkgs/frontend/app/routes/_index.tsx @@ -1,79 +1,83 @@ import { - Box, - Button, - Checkbox, - ClientOnly, - HStack, - Heading, - Progress, - RadioGroup, - Skeleton, - VStack, -} from "@chakra-ui/react" -import type { MetaFunction } from "@remix-run/node" -import { ColorModeToggle } from "../components/color-mode-toggle" + Box, + Button, + Checkbox, + ClientOnly, + HStack, + Heading, + Progress, + RadioGroup, + Skeleton, + VStack, +} from "@chakra-ui/react"; +import type { MetaFunction } from "@remix-run/node"; +import { ColorModeToggle } from "../components/color-mode-toggle"; +import { CommonButton } from "~/components/CommonButton"; export const meta: MetaFunction = () => { - return [ - { title: "New Remix App" }, - { name: "description", content: "Welcome to Remix!" }, - ] -} + return [ + { title: "New Remix App" }, + { name: "description", content: "Welcome to Remix!" }, + ]; +}; export default function Index() { - return ( - - - chakra logo - - Welcome to Chakra UI v3 + Remix - + return ( + + + <>Click me + + + chakra logo + + Welcome to Chakra UI v3 + Remix + - - - - - - - Checkbox - + + + + + + + Checkbox + - - - - - - - Radio - + + + + + + + Radio + - - - - - - Radio - - - + + + + + + Radio + + + - - - - - + + + + + - - - - - + + + + + - - }> - - - - - ) + + }> + + + + + ); }