From 9f9a2394920bcc24907929fd94aad879bc505da0 Mon Sep 17 00:00:00 2001 From: benalleng Date: Wed, 16 Aug 2023 16:55:23 -0400 Subject: [PATCH] Refactor: rewrite button.tsx --- package.json | 1 - pnpm-lock.yaml | 15 +--- src/components/AmountEditable.tsx | 16 ++-- src/components/ContactForm.tsx | 8 +- src/components/KitchenSink.tsx | 8 +- src/components/OnboardWarning.tsx | 1 - src/components/layout/Button.tsx | 123 ++++++++++++++---------------- src/components/layout/Misc.tsx | 2 +- src/routes/Receive.tsx | 22 +++--- src/routes/Send.tsx | 23 +++--- src/routes/Swap.tsx | 19 ++--- vite.config.ts | 1 - 12 files changed, 110 insertions(+), 129 deletions(-) diff --git a/package.json b/package.json index 1afb458..823a4b2 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "@mutinywallet/waila-wasm": "^0.2.1", "@solid-primitives/upload": "^0.0.111", "@thisbeyond/solid-select": "^0.14.0", - "class-variance-authority": "^0.4.0", "i18next": "^22.5.1", "i18next-browser-languagedetector": "^7.1.0", "qr-scanner": "^1.4.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a943965..4e5b9be 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,9 +49,6 @@ importers: '@thisbeyond/solid-select': specifier: ^0.14.0 version: 0.14.0(solid-js@1.7.8) - class-variance-authority: - specifier: ^0.4.0 - version: 0.4.0(typescript@5.1.6) i18next: specifier: ^22.5.1 version: 22.5.1 @@ -6200,17 +6197,6 @@ packages: engines: {node: '>=8'} dev: true - /class-variance-authority@0.4.0(typescript@5.1.6): - resolution: {integrity: sha512-74enNN8O9ZNieycac/y8FxqgyzZhZbxmCitAtAeUrLPlxjSd5zA7LfpprmxEcOmQBnaGs5hYhiSGnJ0mqrtBLQ==} - peerDependencies: - typescript: '>= 4.5.5 < 5' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - typescript: 5.1.6 - dev: false - /clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -12738,6 +12724,7 @@ packages: resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} engines: {node: '>=14.17'} hasBin: true + dev: true /uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} diff --git a/src/components/AmountEditable.tsx b/src/components/AmountEditable.tsx index 280692a..879e516 100644 --- a/src/components/AmountEditable.tsx +++ b/src/components/AmountEditable.tsx @@ -15,7 +15,7 @@ import { useNavigate } from "solid-start"; import close from "~/assets/icons/close.svg"; import currencySwap from "~/assets/icons/currency-swap.svg"; import pencil from "~/assets/icons/pencil.svg"; -import { Button, FeesModal, InfoBox, InlineAmount } from "~/components"; +import { Button, FeesModal, InfoBox, InlineAmount, VStack } from "~/components"; import { useI18n } from "~/i18n/context"; import { Network } from "~/logic/mutinyWalletSetup"; import { useMegaStore } from "~/state/megaStore"; @@ -576,13 +576,13 @@ export const AmountEditable: ParentComponent<{ )} - + + + diff --git a/src/components/ContactForm.tsx b/src/components/ContactForm.tsx index 4f0b34b..17b64c7 100644 --- a/src/components/ContactForm.tsx +++ b/src/components/ContactForm.tsx @@ -49,9 +49,11 @@ export function ContactForm(props: { */} - + + + ); } diff --git a/src/components/KitchenSink.tsx b/src/components/KitchenSink.tsx index feb26d0..ebcdf36 100644 --- a/src/components/KitchenSink.tsx +++ b/src/components/KitchenSink.tsx @@ -68,7 +68,7 @@ function PeerItem(props: { peer: MutinyPeer }) { {JSON.stringify(props.peer, null, 2)} + + + diff --git a/src/routes/Send.tsx b/src/routes/Send.tsx index 5afdca7..72d144c 100644 --- a/src/routes/Send.tsx +++ b/src/routes/Send.tsx @@ -715,17 +715,18 @@ export default function Send() { - + + + diff --git a/src/routes/Swap.tsx b/src/routes/Swap.tsx index 9f0174e..1ca8045 100644 --- a/src/routes/Swap.tsx +++ b/src/routes/Swap.tsx @@ -443,15 +443,16 @@ export default function Swap() {
- + + + diff --git a/vite.config.ts b/vite.config.ts index 761fc17..b0ae087 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -56,7 +56,6 @@ export default defineConfig({ // Don't want vite to bundle these late during dev causing reload include: [ "qr-scanner", - "class-variance-authority", "@kobalte/core", "@solid-primitives/upload", "i18next",