Skip to content

Commit 505dfe5

Browse files
authored
Merge pull request #11036 from TylerAPfledderer/refactor/combine-button-directory
refactor: combine directories of the button components
2 parents 0c9db3c + 62f7ed2 commit 505dfe5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+87
-80
lines changed

src/components/AssetDownload/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Box, Flex, FlexProps } from "@chakra-ui/react"
44

55
// Components
66
import Translation from "../Translation"
7-
import ButtonLink from "../ButtonLink"
7+
import { ButtonLink } from "../Buttons"
88
import AssetDownloadImage from "./AssetDownloadImage"
99
import AssetDownloadArtist from "./AssetDownloadArtist"
1010
import OldHeading from "../OldHeading"

src/components/BeaconChainActions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getImage, ImageDataLike } from "../utils/image"
77

88
import CardList from "./CardList"
99
import Card from "./Card"
10-
import ButtonLink from "./ButtonLink"
10+
import { ButtonLink } from "./Buttons"
1111
import Translation from "./Translation"
1212
import OldHeading from "./OldHeading"
1313

src/components/BugBountyCards.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from "@chakra-ui/react"
1515

1616
import { TranslationKey } from "../utils/translations"
17-
import ButtonLink from "./ButtonLink"
17+
import { ButtonLink } from "./Buttons"
1818
import Text from "./OldText"
1919

2020
import Translation from "./Translation"

src/components/Button/Button.stories.tsx renamed to src/components/Buttons/Button.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { getThemingArgTypes } from "@chakra-ui/storybook-addon"
44
import { Meta, StoryObj } from "@storybook/react"
55
import { MdExpandMore, MdChevronRight, MdNightlight } from "react-icons/md"
66
import theme from "../../@chakra-ui/gatsby-plugin/theme"
7-
import ButtonLink from "../ButtonLink"
8-
import IconButton from "../IconButton"
7+
import ButtonLink from "./ButtonLink"
8+
import IconButton from "./IconButton"
99
import Translation from "../Translation"
10-
import Button from "."
10+
import Button from "./Button"
1111

1212
type ButtonType = typeof Button
1313

File renamed without changes.

src/components/ButtonLink.tsx renamed to src/components/Buttons/ButtonLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
22

33
import type { IProps as IButtonProps } from "./Button"
4-
import { BaseLink, IBaseProps as ILinkProps } from "./Link"
4+
import { BaseLink, IBaseProps as ILinkProps } from "../Link"
55
import Button from "./Button"
66

77
export interface IProps extends ILinkProps, Omit<IButtonProps, "toId"> {}
File renamed without changes.

src/components/Buttons/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Button, { IProps as IButtonProps } from "./Button"
2+
import ButtonLink, { IProps as IButtonLinkProps } from "./ButtonLink"
3+
import IconButton from "./IconButton"
4+
import ButtonTwoLines from "./ButtonTwoLines"
5+
6+
export {
7+
Button,
8+
ButtonLink,
9+
IconButton,
10+
IButtonProps,
11+
IButtonLinkProps,
12+
ButtonTwoLines,
13+
}

0 commit comments

Comments
 (0)