diff --git a/src/app/designs/rounded/_components/control-panel/control-panel.stories.tsx b/src/app/designs/rounded/_components/control-panel/control-panel.stories.tsx new file mode 100644 index 00000000..6b928ff7 --- /dev/null +++ b/src/app/designs/rounded/_components/control-panel/control-panel.stories.tsx @@ -0,0 +1,12 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import { ControlPanel } from './control-panel'; + +const meta: Meta = { + title: 'app/designs/rounded/control-panel', + component: ControlPanel, +}; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = {}; diff --git a/src/app/designs/rounded/_components/control-panel/control-panel.tsx b/src/app/designs/rounded/_components/control-panel/control-panel.tsx new file mode 100644 index 00000000..c81c3741 --- /dev/null +++ b/src/app/designs/rounded/_components/control-panel/control-panel.tsx @@ -0,0 +1,189 @@ +'use client'; + +import { FC, KeyboardEvent, MouseEvent, TouchEvent } from 'react'; +import { useControlPanel } from './use-control-panel'; +import clsx from 'clsx'; +import { IconButton } from '@/components/icon-button'; +import { ClipboardPenLine } from 'lucide-react'; +import { useClipboard } from '@/hooks/clipboard'; + +const OperateButton: FC<{ + label: string; + position: { + top?: string; + right?: string; + bottom?: string; + left?: string; + }; + variable: 'primary' | 'secondary' | 'quaternary' | 'tertiary'; + onMouseDown: (e: MouseEvent) => void; + onTouchStart: (e: TouchEvent) => void; + onKeyDown: (e: KeyboardEvent) => void; + isActive: boolean; +}> = ({ + label, + position, + variable, + onMouseDown, + onTouchStart, + onKeyDown, + isActive, +}) => { + return ( +