From cf0f580e64c7e8ad1f9fb84730ece8ca77e142e9 Mon Sep 17 00:00:00 2001 From: tylerapfledderer Date: Fri, 9 Aug 2024 13:09:10 -0400 Subject: [PATCH] refactor(pages/learn): move ShadCN buttons and links to prod area --- src/components/Buttons/Button.stories.tsx | 136 ------------------ .../ButtonTwoLines/ButtonTwoLines.stories.tsx | 34 ----- src/components/FeedbackWidget/FixedDot.tsx | 4 +- src/components/FeedbackWidget/index.tsx | 4 +- src/components/Footer.tsx | 5 +- src/components/Nav/Menu/index.tsx | 2 +- src/components/Nav/Mobile/FooterButton.tsx | 5 +- src/components/Nav/Mobile/HamburgerButton.tsx | 5 +- src/components/Nav/Mobile/LvlAccordion.tsx | 4 +- src/components/Nav/Mobile/index.tsx | 2 +- src/components/SkipLink.tsx | 2 +- {tailwind => src/components}/ui/Link.tsx | 0 .../ui/__stories__/Button.stories.tsx | 4 +- .../ui/__stories__/ButtonLink.stories.tsx | 2 +- .../ui/__stories__/ButtonTwoLines.stories.tsx | 2 +- .../__stories__}/Link.stories.tsx | 0 .../components}/ui/buttons/Button.tsx | 0 .../components}/ui/buttons/ButtonTwoLines.tsx | 2 +- src/components/ui/sheet.tsx | 2 +- src/pages/learn.tsx | 4 +- 20 files changed, 21 insertions(+), 198 deletions(-) delete mode 100644 src/components/Buttons/Button.stories.tsx delete mode 100644 src/components/Buttons/ButtonTwoLines/ButtonTwoLines.stories.tsx rename {tailwind => src/components}/ui/Link.tsx (100%) rename {tailwind => src/components}/ui/__stories__/Button.stories.tsx (95%) rename {tailwind => src/components}/ui/__stories__/ButtonLink.stories.tsx (89%) rename {tailwind => src/components}/ui/__stories__/ButtonTwoLines.stories.tsx (93%) rename src/components/{BaseStories => ui/__stories__}/Link.stories.tsx (100%) rename {tailwind => src/components}/ui/buttons/Button.tsx (100%) rename {tailwind => src/components}/ui/buttons/ButtonTwoLines.tsx (98%) diff --git a/src/components/Buttons/Button.stories.tsx b/src/components/Buttons/Button.stories.tsx deleted file mode 100644 index 6fc779b2e62..00000000000 --- a/src/components/Buttons/Button.stories.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import * as React from "react" -import { MdChevronRight, MdExpandMore, MdNightlight } from "react-icons/md" -import { HStack, Text, ThemingProps, VStack } from "@chakra-ui/react" -import { Meta, StoryObj } from "@storybook/react" - -import { getThemingArgTypes } from "../../../.storybook/types" -import theme from "../../@chakra-ui/theme" -import Translation from "../Translation" - -import Button from "./Button" -import ButtonLink from "./ButtonLink" -import IconButton from "./IconButton" - -const meta = { - title: "Atoms / Form / Buttons", - component: Button, - args: { - children: "What is Ethereum?", - }, - argTypes: { - isSecondary: { - defaultValue: false, - type: "boolean", - name: "Is a secondary color?", - if: { arg: "variant", neq: "solid" }, - }, - }, -} satisfies Meta - -export default meta - -type Story = StoryObj - -const variants: ThemingProps<"Button">["variant"][] = [ - "solid", - "outline", - "ghost", - "link", -] - -export const StyleVariants: Story = { - argTypes: { - size: { - ...getThemingArgTypes(theme, "Button")?.size, - defaultValue: "md", - }, - }, - render: (args) => ( - - {variants.map((variant, idx) => ( - -