Button colors
This commit is contained in:
+6
-2
@@ -8,6 +8,8 @@ export type ReadonlyPalette = typeof lightPalette
|
|||||||
export type Palette = Mutable<ReadonlyPalette>
|
export type Palette = Mutable<ReadonlyPalette>
|
||||||
|
|
||||||
export const lightPalette = {
|
export const lightPalette = {
|
||||||
|
white: tokens.color.white,
|
||||||
|
black: tokens.color.black,
|
||||||
primary: tokens.color.blue_500,
|
primary: tokens.color.blue_500,
|
||||||
positive: tokens.color.green_500,
|
positive: tokens.color.green_500,
|
||||||
negative: tokens.color.red_500,
|
negative: tokens.color.red_500,
|
||||||
@@ -26,9 +28,11 @@ export const lightPalette = {
|
|||||||
} as const
|
} as const
|
||||||
|
|
||||||
export const darkPalette: Palette = {
|
export const darkPalette: Palette = {
|
||||||
|
white: tokens.color.white,
|
||||||
|
black: tokens.color.black,
|
||||||
primary: tokens.color.blue_500,
|
primary: tokens.color.blue_500,
|
||||||
positive: tokens.color.green_400,
|
positive: tokens.color.green_500,
|
||||||
negative: tokens.color.red_400,
|
negative: tokens.color.red_500,
|
||||||
|
|
||||||
contrast_25: tokens.color.gray_900,
|
contrast_25: tokens.color.gray_900,
|
||||||
contrast_50: tokens.color.gray_800,
|
contrast_50: tokens.color.gray_800,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
export const color = {
|
export const color = {
|
||||||
white: '#FFFFFF',
|
white: '#FFFFFF',
|
||||||
|
black: '#000000',
|
||||||
|
|
||||||
gray_25: `#FCFCFD`,
|
gray_25: `#FCFCFD`,
|
||||||
gray_50: `#F9FAFB`,
|
gray_50: `#F9FAFB`,
|
||||||
|
|||||||
+16
-10
@@ -106,23 +106,29 @@ export function Button({
|
|||||||
case 'primary': {
|
case 'primary': {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
backgroundColor: tokens.color.blue_300,
|
backgroundColor: tokens.color.blue_200,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
backgroundColor: tokens.color.blue_500,
|
backgroundColor: tokens.color.blue_500,
|
||||||
})
|
})
|
||||||
|
hoverStyles.push({
|
||||||
|
backgroundColor: tokens.color.blue_600,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'secondary': {
|
case 'secondary': {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
backgroundColor: tokens.color.gray_100,
|
backgroundColor: tokens.color.gray_200,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
backgroundColor: tokens.color.gray_200,
|
backgroundColor: tokens.color.gray_300,
|
||||||
|
})
|
||||||
|
hoverStyles.push({
|
||||||
|
backgroundColor: tokens.color.gray_400,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -145,16 +151,16 @@ export function Button({
|
|||||||
switch (size) {
|
switch (size) {
|
||||||
case 'large': {
|
case 'large': {
|
||||||
baseStyles.push(
|
baseStyles.push(
|
||||||
atoms.py_md,
|
{paddingVertical: 15},
|
||||||
atoms.px_xl,
|
atoms.px_2xl,
|
||||||
atoms.rounded_md,
|
atoms.rounded_sm,
|
||||||
atoms.gap_sm,
|
atoms.gap_sm,
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'small': {
|
case 'small': {
|
||||||
baseStyles.push(
|
baseStyles.push(
|
||||||
atoms.py_sm,
|
{paddingVertical: 9},
|
||||||
atoms.px_md,
|
atoms.px_md,
|
||||||
atoms.rounded_sm,
|
atoms.rounded_sm,
|
||||||
atoms.gap_xs,
|
atoms.gap_xs,
|
||||||
@@ -239,11 +245,11 @@ export function ButtonText({
|
|||||||
case 'secondary': {
|
case 'secondary': {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
color: tokens.color.gray_500,
|
color: tokens.color.gray_400,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
color: tokens.color.gray_700,
|
color: tokens.color.gray_800,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -261,7 +267,7 @@ export function ButtonText({
|
|||||||
switch (size) {
|
switch (size) {
|
||||||
case 'small': {
|
case 'small': {
|
||||||
baseStyles.push(
|
baseStyles.push(
|
||||||
atoms.text_sm,
|
atoms.text_md,
|
||||||
web({paddingBottom: 1}),
|
web({paddingBottom: 1}),
|
||||||
native({marginTop: 2}),
|
native({marginTop: 2}),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user