Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: radii sizes and add keyframe #37

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leather-wallet/tokens",
"version": "0.0.2",
"version": "0.0.3",
"description": "Shared design tokens",
"main": "src/index.ts",
"homepage": "https://github.com/leather-wallet/mono/tree/dev/packages/tokens",
Expand Down
49 changes: 40 additions & 9 deletions packages/tokens/src/keyframes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ export const keyframes = {
backgroundPosition: '500px',
},
},
rotate: {
'0%': {
transform: 'rotate(0deg)',
},
'100%': {
transform: 'rotate(360deg)',
},
},
// TODO: identical to above, remove
spin: {
'0%': {
transform: 'rotate(0deg)',
Expand All @@ -40,4 +31,44 @@ export const keyframes = {
strokeDashoffset: 0,
},
},
slideUpAndFade: {
from: {
opacity: 0,
transform: 'translateY(2px)',
},
to: {
opacity: 1,
transform: 'translateY(0)',
},
},
slideRightAndFade: {
from: {
opacity: 0,
transform: 'translateX(-2px)',
},
to: {
opacity: 1,
transform: 'translateX(0)',
},
},
slideDownAndFade: {
from: {
opacity: 0,
transform: 'translateY(-2px)',
},
to: {
opacity: 1,
transform: 'translateY(0)',
},
},
slideLeftAndFade: {
from: {
opacity: 0,
transform: 'translateX(2px)',
},
to: {
opacity: 1,
transform: 'translateX(0)',
},
},
} as const;
10 changes: 4 additions & 6 deletions packages/tokens/src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ export const tokens = {
xl: { value: '36px' },
},
radii: {
xs: { value: '8px' },
sm: { value: '10px' },
md: { value: '12px' },
lg: { value: '16px' },
xl: { value: '20px' },
xxl: { value: '24px' },
xs: { value: '2px' },
sm: { value: '4px' },
md: { value: '8px' },
lg: { value: '12px' },
},
spacing: {
// Numbers are padded with 0 to ensure they are sorted correctly in TS
Expand Down
Loading