From be33537e2a1c0a5afe7cb508b8cba5a11974d81c Mon Sep 17 00:00:00 2001 From: David Totraev Date: Fri, 22 Nov 2024 23:26:38 +0500 Subject: [PATCH] feat: tw prefixes --- package-lock.json | 12 ++++++------ package.json | 2 +- src/components/ChainButton/index.stories.tsx | 2 +- src/components/ChainButton/index.tsx | 12 ++++++------ src/components/Chains/index.stories.ts | 2 +- src/components/Chains/index.tsx | 9 +++++---- src/components/ConnectedWallet/index.tsx | 15 +++++++++------ src/components/FieldControl/index.tsx | 7 ++++++- src/components/Inscriptions/index.stories.tsx | 2 +- src/components/Inscriptions/index.tsx | 14 +++++++------- src/components/TermsOfService/index.stories.tsx | 2 +- src/components/TermsOfService/index.tsx | 10 +++++----- src/components/WalletButton/index.tsx | 8 ++++---- .../WalletProvider/components/WalletDialog.tsx | 2 +- src/components/Wallets/index.stories.tsx | 6 +++--- src/components/Wallets/index.tsx | 8 ++++---- src/index.css | 2 +- tailwind.config.js | 1 + 18 files changed, 63 insertions(+), 53 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0dce9e8..144e1b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@babylonlabs-io/bbn-wallet-connect", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@babylonlabs-io/bbn-wallet-connect", - "version": "0.0.1", + "version": "0.0.2", "dependencies": { - "@babylonlabs-io/bbn-core-ui": "^0.0.4", + "@babylonlabs-io/bbn-core-ui": "^0.0.9", "react-icons": "^5.3.0" }, "devDependencies": { @@ -360,9 +360,9 @@ } }, "node_modules/@babylonlabs-io/bbn-core-ui": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@babylonlabs-io/bbn-core-ui/-/bbn-core-ui-0.0.4.tgz", - "integrity": "sha512-1UwG60/4czDvM8SqmlHWAF5h5Mg1PCzohN5XXbkADZp//5Lr7hs5tA0v11XKKGjN3BEOILs0A8qYLT5y2EK4Ag==", + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/@babylonlabs-io/bbn-core-ui/-/bbn-core-ui-0.0.9.tgz", + "integrity": "sha512-SF41ESMuNTF1OZEAhtybIh+aOepY7VuQIyysukbSyb4ZHXWZNpxorclJu8JjGrCEIev0Ui8C9mEECZ0Slw88fA==", "peerDependencies": { "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/package.json b/package.json index faf6b64..e57c248 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "release": "npm run build && changeset publish" }, "dependencies": { - "@babylonlabs-io/bbn-core-ui": "^0.0.4", + "@babylonlabs-io/bbn-core-ui": "^0.0.9", "react-icons": "^5.3.0" }, "files": [ diff --git a/src/components/ChainButton/index.stories.tsx b/src/components/ChainButton/index.stories.tsx index 8dc0f47..067d1b4 100644 --- a/src/components/ChainButton/index.stories.tsx +++ b/src/components/ChainButton/index.stories.tsx @@ -27,7 +27,7 @@ export const Connected: Story = { children: ( -
+
{avatar} {title} @@ -37,7 +37,7 @@ export function ChainButton({ className, disabled, alt, logo, title, children, o height="24" viewBox="0 0 24 24" fill="none" - className="ml-auto block" + className="b-ml-auto b-block" > {children && ( -
e.stopPropagation()}> +
e.stopPropagation()}> {children}
)} diff --git a/src/components/Chains/index.stories.ts b/src/components/Chains/index.stories.ts index 1654fc9..637ba32 100644 --- a/src/components/Chains/index.stories.ts +++ b/src/components/Chains/index.stories.ts @@ -43,7 +43,7 @@ export const Default: Story = { account: null, }, }, - className: "h-[600px]", + className: "b-h-[600px]", onSelectChain: console.log, }, }; diff --git a/src/components/Chains/index.tsx b/src/components/Chains/index.tsx index 378cc85..c482861 100644 --- a/src/components/Chains/index.tsx +++ b/src/components/Chains/index.tsx @@ -23,12 +23,12 @@ export function Chains({ chains, selectedWallets = {}, className, onClose, onSel const activeChains = useMemo(() => chains.filter((chain) => chain.wallets.length > 0), [chains]); return ( -
- +
+ Connect to both Bitcoin and Babylon Chain Wallets - + {activeChains.map((chain) => { const selectedWallet = selectedWallets[chain.id]; @@ -54,10 +54,11 @@ export function Chains({ chains, selectedWallets = {}, className, onClose, onSel })} - + + diff --git a/src/components/ConnectedWallet/index.tsx b/src/components/ConnectedWallet/index.tsx index 0cdb03b..ffac17e 100644 --- a/src/components/ConnectedWallet/index.tsx +++ b/src/components/ConnectedWallet/index.tsx @@ -15,28 +15,31 @@ interface ConnectedWalletProps { export function ConnectedWallet({ className, chainId, logo, name, address, onDisconnect }: ConnectedWalletProps) { return (
-
- +
+ {name} {Boolean(address) && ( - + {address} )}
- diff --git a/src/components/WalletButton/index.tsx b/src/components/WalletButton/index.tsx index e399ed2..ec762a5 100644 --- a/src/components/WalletButton/index.tsx +++ b/src/components/WalletButton/index.tsx @@ -16,16 +16,16 @@ export function WalletButton({ className, disabled = false, name, logo, label, o disabled={disabled} as="button" className={twMerge( - "flex h-14 w-full cursor-pointer items-center gap-2.5 rounded border border-primary-main/30 px-2", - disabled ? "cursor-default" : "cursor-pointer", + "b-flex b-h-14 b-w-full b-cursor-pointer b-items-center b-gap-2.5 b-rounded b-border b-border-primary-main/30 b-px-2", + disabled ? "b-cursor-default" : "b-cursor-pointer", className, )} onClick={onClick} > - + {name} - {label && {label}} + {label && {label}}
); } diff --git a/src/components/WalletProvider/components/WalletDialog.tsx b/src/components/WalletProvider/components/WalletDialog.tsx index d50930e..a62c8de 100644 --- a/src/components/WalletProvider/components/WalletDialog.tsx +++ b/src/components/WalletProvider/components/WalletDialog.tsx @@ -54,7 +54,7 @@ export function WalletDialog({ onError }: WalletDialogProps) { - More wallets with Tomo Connect +
+ More wallets with Tomo Connect
), diff --git a/src/components/Wallets/index.tsx b/src/components/Wallets/index.tsx index d172ca0..342cd70 100644 --- a/src/components/Wallets/index.tsx +++ b/src/components/Wallets/index.tsx @@ -27,13 +27,13 @@ export function Wallets({ chain, className, append, onClose, onBack, onSelectWal const wallets = useMemo(() => chain.wallets.filter((wallet) => wallet.id !== "injectable"), [chain]); return ( -
- +
+ Connect a {chain.name} Wallet -
+
{injectableWallet && ( - + diff --git a/src/index.css b/src/index.css index 5b34fb4..1afef37 100644 --- a/src/index.css +++ b/src/index.css @@ -104,7 +104,7 @@ } body { - @apply font-sans text-base font-normal leading-normal tracking-normal text-primary-dark; + @apply b-font-sans b-text-base b-font-normal b-leading-normal b-tracking-normal b-text-primary-dark; font-feature-settings: "liga" off, diff --git a/tailwind.config.js b/tailwind.config.js index 5e31958..c7b3925 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -140,4 +140,5 @@ export default { }, }, plugins: [], + prefix: "b-", };