Button colors

This commit is contained in:
Eric Bailey
2024-01-12 11:35:47 -06:00
parent e85df54156
commit a33fa45b74
3 changed files with 23 additions and 12 deletions
+6 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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}),
) )