Skip to content

Commit

Permalink
chore: move sizes to token package and update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Mar 5, 2024
1 parent ae94da0 commit 9b38907
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 52 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"@dlc-link/dlc-tools": "1.1.1",
"@fungible-systems/zone-file": "2.0.0",
"@hirosystems/token-metadata-api-client": "1.2.0",
"@leather-wallet/tokens": "0.0.8",
"@leather-wallet/tokens": "0.0.10",
"@ledgerhq/hw-transport-webusb": "6.27.19",
"@noble/hashes": "1.3.2",
"@noble/secp256k1": "2.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/app/ui/components/button/button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { BtcAvatarIcon } from '@app/ui/components/avatar/btc-avatar-icon';
import { ChevronDownIcon } from '@app/ui/icons/chevron-down-icon';
import { PlaceholderIcon } from '@app/ui/icons/placeholder-icon';

// TODO - fix this, my branch is missing a lot of variants and I thin kthats whays up with bottons
import { Button as Component } from './button';

const meta: Meta<typeof Component> = {
Expand Down
2 changes: 1 addition & 1 deletion src/background/popup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { pxStringToNumber } from '@shared/utils/px-string-to-number';

// FIXME import from '@leather-wallet/tokens'
// import { tokens } from '../../theme/tokens';
// import { tokens } from '@leather-wallet/tokens';
/**
* importing from tokens gives TS error about
*
Expand Down
4 changes: 1 addition & 3 deletions theme/global/global.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { tokens } from '@leather-wallet/tokens';
import { defineGlobalStyles } from '@pandacss/dev';

// TODO import from '@leather-wallet/tokens'
import { tokens } from '../tokens';

// 4370 TODO audit the use of this file as we are pretty close to not needing it
// - could set some styles in the <Container where radix.css also loaded
// - try make UI things more modular, self contained and independant
Expand Down
43 changes: 1 addition & 42 deletions theme/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,9 @@ import { defineTokens } from '@pandacss/dev';

import { colors } from './colors';

const tempTokens = {
sizes: {
// 4370 TODO - update in monorepo and deprecate - centeredPageFullWidth
pageWidth: { value: '500px' },
twoColumnPageWidth: { value: '500px' },
fullPageMaxWidth: { value: '882px' },
// FIXME - audit dialogHeight
dialogHeight: { value: '600px' },
dialogContentHeight: { value: '500px' },
headerHeight: { value: '80px' },
footerHeight: { value: '95px' },
// #4250 setting consistent dimensions of extension + popup to match mobile
popupWidth: { value: '390px' },
popupHeight: { value: '756px' },
popupHeaderHeight: { value: '68px' },
headerContainerHeight: { value: '40px' },
logoHeight: { value: '32px' },
logoWidth: { value: '86px' },
inputHeight: { value: '64px' },
iconButtonWithLabelWidth: { value: '64px' },
settingsMenuWidth: { value: '240px' },
},
};

// ts-unused-exports:disable-next-line
export const tokens = defineTokens({
...leatherTokens,
// TODO: Update in mono repo
borders: {
action: { value: '1px solid {colors.ink.action-primary-default}' },
active: { value: '2px solid {colors.ink.border-default}' },
background: { value: '2px solid {colors.ink.background-primary}' },
dashed: { value: '2px dashed {colors.ink.component-background-default}' },
default: { value: '1px solid {colors.ink.border-default}' },
error: { value: '1px solid {colors.red.border}' },
focus: { value: '2px solid {colors.ink.action-primary-default}' },
invert: { value: '1px solid {colors.invert}' },
subdued: { value: '1px solid {colors.ink.text-subdued}' },
warning: { value: '1px solid {colors.yellow.border}' },
},
colors,

sizes: {
...leatherTokens.sizes,
...tempTokens.sizes,
},
colors,
});
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2594,10 +2594,10 @@
"@trivago/prettier-plugin-sort-imports" "^4.2.0"
prettier "^3.0.3"

"@leather-wallet/[email protected].8":
version "0.0.8"
resolved "https://registry.yarnpkg.com/@leather-wallet/tokens/-/tokens-0.0.8.tgz#a5dca68793b439368c74db9e51c12c646e0ffcf0"
integrity sha512-Sd3tSlIWUkEuCeW9FfwPT4jQNvK2JSxEucurr1iBoRROxwNKPiEF5j1/HKBC6SNl5WjgF1BHzWiaeDs3n9y16w==
"@leather-wallet/[email protected].10":
version "0.0.10"
resolved "https://registry.yarnpkg.com/@leather-wallet/tokens/-/tokens-0.0.10.tgz#8d944d6f63847a71d9739974163554496c92b79c"
integrity sha512-DhFBpPclCaDM5+o/H5+luPfTrnLuQ8aW9PGBRSc+yiIhSL1wNv/fuTljF/R4uHQQblG4EQQ2fjRyh5XKBEfKaQ==

"@ledgerhq/devices@^8.0.7", "@ledgerhq/devices@^8.2.0":
version "8.2.0"
Expand Down

0 comments on commit 9b38907

Please sign in to comment.