Skip to content

Commit 058ae6c

Browse files
refactor: remove the old Select component
1 parent 9bd486f commit 058ae6c

File tree

13 files changed

+131
-331
lines changed

13 files changed

+131
-331
lines changed

src/@chakra-ui/components/ReactSelect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createMultiStyleConfigHelpers, cssVar } from "@chakra-ui/react"
22

3-
import { reactSelectAnatomyKeys } from "@/components/ReactSelect/innerComponents"
3+
import { reactSelectAnatomyKeys } from "@/components/Select/innerComponents"
44

55
const $borderBaseWidth = cssVar("border-base-width")
66

src/@chakra-ui/components/Select.ts

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/@chakra-ui/components/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { Popover } from "./Popover"
2323
import { Progress } from "./Progress"
2424
import { Radio } from "./Radio"
2525
import { ReactSelect } from "./ReactSelect"
26-
import { Select } from "./Select"
2726
import { Switch } from "./Switch"
2827
import { Table } from "./Table"
2928
import { Tabs } from "./Tabs"
@@ -54,7 +53,6 @@ export default {
5453
Progress,
5554
Radio,
5655
ReactSelect,
57-
Select,
5856
Spinner: spinnerDefaultTheme,
5957
Switch,
6058
Table,

src/components/CentralizedExchanges/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Emoji from "@/components/Emoji"
99
import InlineLink from "@/components/Link"
1010
import OldHeading from "@/components/OldHeading"
1111
import Text from "@/components/OldText"
12-
import ReactSelect from "@/components/ReactSelect"
12+
import Select from "@/components/Select"
1313

1414
import { getLocaleTimestamp } from "@/lib/utils/time"
1515

@@ -103,7 +103,7 @@ const CentralizedExchanges = ({
103103
{t("page-get-eth-exchanges-intro")}
104104
</Text>
105105
<Box w="full" maxW="container.sm">
106-
<ReactSelect
106+
<Select
107107
instanceId="eth-exchange-region"
108108
aria-label={t("page-get-eth-exchanges-header")}
109109
options={selectOptions}

src/components/FindWallet/WalletTable/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
import { Image } from "@/components/Image"
3030
import InlineLink, { LinkProps } from "@/components/Link"
3131
import Text from "@/components/OldText"
32-
import ReactSelect, { ReactSelectOnChange } from "@/components/ReactSelect"
32+
import Select, { SelectOnChange } from "@/components/Select"
3333

3434
import { trackCustomEvent } from "@/lib/utils/matomo"
3535

@@ -246,7 +246,7 @@ const WalletTable = ({ filters, walletData }: WalletTableProps) => {
246246
(
247247
colName: ColumnClassName,
248248
featureDispatch: SetFeatureSelectState
249-
): ReactSelectOnChange<DropdownOption> =>
249+
): SelectOnChange<DropdownOption> =>
250250
(selectedOption) => {
251251
if (!selectedOption) return
252252
updateDropdown(selectedOption, featureDispatch, colName)
@@ -275,7 +275,7 @@ const WalletTable = ({ filters, walletData }: WalletTableProps) => {
275275
<Text as="span" hideFrom="sm" fontSize="md" whiteSpace="nowrap">
276276
{t("page-find-wallet-choose-features")}
277277
</Text>
278-
<ReactSelect
278+
<Select
279279
options={[
280280
{
281281
label: t("page-find-choose-to-compare"),
@@ -290,7 +290,7 @@ const WalletTable = ({ filters, walletData }: WalletTableProps) => {
290290
/>
291291
</Th>
292292
<Th>
293-
<ReactSelect
293+
<Select
294294
options={[
295295
{
296296
label: t("page-find-choose-to-compare"),
@@ -305,7 +305,7 @@ const WalletTable = ({ filters, walletData }: WalletTableProps) => {
305305
/>
306306
</Th>
307307
<Th>
308-
<ReactSelect
308+
<Select
309309
options={[
310310
{
311311
label: t("page-find-choose-to-compare"),

src/components/Layer2/Layer2Onboard.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ import { ButtonLink } from "../Buttons"
2828
import InlineLink from "../Link"
2929
import OldHeading from "../OldHeading"
3030
import Text from "../OldText"
31-
import ReactSelect, { ReactSelectOnChange } from "../ReactSelect"
32-
import { StyledSelect as Select } from "../SharedStyledComponents"
31+
import Select, { SelectOnChange } from "../Select"
3332

3433
const Flex50 = (props: ChildOnlyProp) => (
3534
<Box flex={{ base: "100%", md: "50%" }} {...props} />
@@ -174,7 +173,7 @@ const Layer2Onboard = ({
174173
},
175174
} as const
176175

177-
const handleLayer2SelectChange: ReactSelectOnChange<Layer2Option> = (
176+
const handleLayer2SelectChange: SelectOnChange<Layer2Option> = (
178177
selectedOption
179178
) => {
180179
if (!selectedOption) return
@@ -188,7 +187,7 @@ const Layer2Onboard = ({
188187
setSelectedL2(selectedOption.l2)
189188
}
190189

191-
const handleExchangeOnboard: ReactSelectOnChange<
190+
const handleExchangeOnboard: SelectOnChange<
192191
ExchangeOption | CexOnboardOption
193192
> = (selectedOption) => {
194193
if (!selectedOption) return
@@ -242,7 +241,7 @@ const Layer2Onboard = ({
242241
</Box>
243242
{/* LeftSelected */}
244243
<Box mt="auto">
245-
<ReactSelect
244+
<Select
246245
instanceId="layer2-left-selected"
247246
placeholder={t("layer-2-onboard-wallet-input-placeholder")}
248247
options={layer2Options}
@@ -265,7 +264,7 @@ const Layer2Onboard = ({
265264
</Box>
266265
{/* RightSelect */}
267266
<Box mt="auto">
268-
<ReactSelect
267+
<Select
269268
instanceId="exchange-onboard-select"
270269
options={[
271270
{

src/components/ReactSelect/ReactSelect.stories.tsx

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/components/ReactSelect/index.tsx

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)