diff --git a/app/components/reusable/ButtonIconStack/ButtonIconStack.mdx b/app/components/reusable/ButtonIconStack/ButtonIconStack.mdx new file mode 100644 index 0000000000..8887452b4d --- /dev/null +++ b/app/components/reusable/ButtonIconStack/ButtonIconStack.mdx @@ -0,0 +1,13 @@ +import { Canvas, Meta } from '@storybook/blocks'; + +import * as ButtonIconStackStories from './ButtonIconStack.stories'; + + + +# ButtonIconStackStories + +A button denotes a possible action to be taken on behalf of the user. + +This button shows only a single icon. + + diff --git a/app/components/reusable/ButtonIconStack/ButtonIconStack.stories.tsx b/app/components/reusable/ButtonIconStack/ButtonIconStack.stories.tsx new file mode 100644 index 0000000000..38114494e3 --- /dev/null +++ b/app/components/reusable/ButtonIconStack/ButtonIconStack.stories.tsx @@ -0,0 +1,28 @@ +import { faImage } from "@fortawesome/pro-solid-svg-icons"; +import { withActions } from "@storybook/addon-actions/decorator"; +import type { Meta, StoryObj } from "@storybook/react"; +import { ButtonIconStack } from "./ButtonIconStack"; + +const meta: Meta = { + component: ButtonIconStack, + parameters: { + actions: { + handles: ["click"], + }, + }, + decorators: [withActions], +}; + +type Story = StoryObj; + +export const Default: Story = { + render: () => ( + { }} + icon={faImage} + text={"Start Frame"} + /> + ), +}; + +export default meta; diff --git a/app/components/reusable/ButtonIconStack/ButtonIconStack.tsx b/app/components/reusable/ButtonIconStack/ButtonIconStack.tsx new file mode 100644 index 0000000000..5a18d77b9b --- /dev/null +++ b/app/components/reusable/ButtonIconStack/ButtonIconStack.tsx @@ -0,0 +1,39 @@ +import { IconDefinition } from "@fortawesome/fontawesome-svg-core"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { twMerge } from "tailwind-merge"; + +interface ButtonIconStackProps { + icon: IconDefinition; + text: string; + onClick?: () => void; + style?: string; + additionalStyle?: string; +} + +export function ButtonIconStack({ + icon, + text = "", + onClick, + style, + additionalStyle, +}: ButtonIconStackProps) { + + const defaultStyle = twMerge( + "flex flex-col items-center justify-center text-xs transition-all duration-150", + "h-full w-full gap-1 p-2", + additionalStyle + ) + + + return ( + + ); +} diff --git a/app/components/reusable/ButtonIconStack/index.ts b/app/components/reusable/ButtonIconStack/index.ts new file mode 100644 index 0000000000..b60ba78b11 --- /dev/null +++ b/app/components/reusable/ButtonIconStack/index.ts @@ -0,0 +1 @@ +export * from "./ButtonIconStack";