Tweak button colors
This commit is contained in:
+11
-43
@@ -274,18 +274,10 @@ export const Button = React.forwardRef<View, ButtonProps>(
|
|||||||
} else if (color === 'primary_subtle') {
|
} else if (color === 'primary_subtle') {
|
||||||
if (!disabled) {
|
if (!disabled) {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
backgroundColor: select(t.name, {
|
backgroundColor: t.palette.primary_50,
|
||||||
light: t.palette.primary_50,
|
|
||||||
dim: t.palette.primary_100,
|
|
||||||
dark: t.palette.primary_100,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
hoverStyles.push({
|
hoverStyles.push({
|
||||||
backgroundColor: select(t.name, {
|
backgroundColor: t.palette.primary_100,
|
||||||
light: t.palette.primary_100,
|
|
||||||
dim: t.palette.primary_200,
|
|
||||||
dark: t.palette.primary_200,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
@@ -295,18 +287,10 @@ export const Button = React.forwardRef<View, ButtonProps>(
|
|||||||
} else if (color === 'negative_subtle') {
|
} else if (color === 'negative_subtle') {
|
||||||
if (!disabled) {
|
if (!disabled) {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
backgroundColor: select(t.name, {
|
backgroundColor: t.palette.negative_50,
|
||||||
light: t.palette.negative_50,
|
|
||||||
dim: t.palette.negative_100,
|
|
||||||
dark: t.palette.negative_100,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
hoverStyles.push({
|
hoverStyles.push({
|
||||||
backgroundColor: select(t.name, {
|
backgroundColor: t.palette.negative_100,
|
||||||
light: t.palette.negative_100,
|
|
||||||
dim: t.palette.negative_200,
|
|
||||||
dark: t.palette.negative_200,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
@@ -618,37 +602,21 @@ export function useSharedButtonTextStyles() {
|
|||||||
} else if (color === 'primary_subtle') {
|
} else if (color === 'primary_subtle') {
|
||||||
if (!disabled) {
|
if (!disabled) {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
color: select(t.name, {
|
color: t.palette.primary_600,
|
||||||
light: t.palette.primary_600,
|
|
||||||
dim: t.palette.primary_800,
|
|
||||||
dark: t.palette.primary_800,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
color: select(t.name, {
|
color: t.palette.primary_200,
|
||||||
light: t.palette.primary_200,
|
|
||||||
dim: t.palette.primary_200,
|
|
||||||
dark: t.palette.primary_200,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (color === 'negative_subtle') {
|
} else if (color === 'negative_subtle') {
|
||||||
if (!disabled) {
|
if (!disabled) {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
color: select(t.name, {
|
color: t.palette.negative_600,
|
||||||
light: t.palette.negative_600,
|
|
||||||
dim: t.palette.negative_800,
|
|
||||||
dark: t.palette.negative_800,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
baseStyles.push({
|
baseStyles.push({
|
||||||
color: select(t.name, {
|
color: t.palette.negative_200,
|
||||||
light: t.palette.negative_200,
|
|
||||||
dim: t.palette.negative_200,
|
|
||||||
dark: t.palette.negative_200,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -751,11 +719,11 @@ export function useSharedButtonTextStyles() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (size === 'large') {
|
if (size === 'large') {
|
||||||
baseStyles.push(a.text_md, a.leading_snug, a.font_medium)
|
baseStyles.push(a.text_md, a.leading_snug, a.font_semi_bold)
|
||||||
} else if (size === 'small') {
|
} else if (size === 'small') {
|
||||||
baseStyles.push(a.text_sm, a.leading_snug, a.font_medium)
|
baseStyles.push(a.text_sm, a.leading_snug, a.font_semi_bold)
|
||||||
} else if (size === 'tiny') {
|
} else if (size === 'tiny') {
|
||||||
baseStyles.push(a.text_xs, a.leading_snug, a.font_medium)
|
baseStyles.push(a.text_xs, a.leading_snug, a.font_semi_bold)
|
||||||
}
|
}
|
||||||
|
|
||||||
return StyleSheet.flatten(baseStyles)
|
return StyleSheet.flatten(baseStyles)
|
||||||
|
|||||||
Reference in New Issue
Block a user