Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
refactor: rename weight
Browse files Browse the repository at this point in the history
  • Loading branch information
Шараев Айнур Раильевич committed Jul 5, 2021
1 parent 5eff4ae commit efddb3f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/lib/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,37 +98,37 @@ export const Global = styled.div`
priorityName: 'primary',
paletteName: 'primary',
bwPaletteName: 'bw',
weight: 'filled',
weight: 'fill',
})}
${createPriority({
priorityName: 'secondary',
paletteName: 'secondary',
bwPaletteName: 'bw',
weight: 'filled',
weight: 'fill',
})}
${createPriority({
priorityName: 'default',
bwPaletteName: 'bw',
weight: 'filled',
weight: 'fill',
})}
${createPriority({
priorityName: 'goast',
priorityName: 'white',
bwPaletteName: 'bw',
weight: 'transparent',
})}
${createPriority({
priorityName: 'danger',
paletteName: 'danger',
bwPaletteName: 'bw',
weight: 'filled',
weight: 'fill',
})}
/** for examples of priorities in button */
${createPriority({
/** for examples of priorities in button */
${createPriority({
priorityName: 'primary-goast',
paletteName: 'primary',
bwPaletteName: 'bw',
Expand Down
6 changes: 3 additions & 3 deletions src/lib/priority.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface PriorityType {
bwPaletteName: string;
paletteName?: string;
priorityName: string;
weight: 'filled' | 'outlined' | 'transparent';
weight: 'fill' | 'outline' | 'transparent';
}

export const createPriority = ({
Expand Down Expand Up @@ -33,7 +33,7 @@ export const createPriority = ({
'canvas-text-active': `hsla(var(--${palette}-700), 1);`,
};

if (weight === 'filled') {
if (weight === 'fill') {
colors['shape-default'] = `hsla(var(--${palette}-500), 1)`;
colors['shape-disabled'] = `hsla(var(--${palette}-200), 1)`;
colors['shape-hover'] = `hsla(var(--${palette}-600), 1)`;
Expand All @@ -47,7 +47,7 @@ export const createPriority = ({
colors['canvas-text-active'] = `hsla(var(--${bwPaletteName}-0), 1)`;
}

if (weight === 'none') {
if (weight === 'transparent') {
colors['shape-disabled'] = `transparent`;
colors['shape-text-default'] = `hsla(var(--${palette}-500), 1)`;
colors['shape-text-hover'] = `hsla(var(--${palette}-600), 1)`;
Expand Down

0 comments on commit efddb3f

Please sign in to comment.