Skip to content

Commit

Permalink
fix(core): update colors for statusButton and imagePreview
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobonamin authored and juice49 committed Oct 15, 2024
1 parent 0b9311f commit 906d254
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/sanity/src/core/components/StatusButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export const StatusButton = forwardRef(function StatusButton(
...restProps
} = props
const theme = useTheme()
const toneColor = tone && theme.sanity.color.solid[tone]
const toneToUse = tone === 'prospect' || tone === 'explore' ? 'default' : tone
const toneColor = toneToUse && theme.sanity.color.solid[toneToUse]
const dotStyle = useMemo(() => ({backgroundColor: toneColor?.enabled.bg}), [toneColor])
const disabled = Boolean(disabledProp)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ export const Overlay = styled(Flex)<{
$tone: Exclude<CardTone, 'inherit'>
}>(({$tone}) => {
const colorScheme = useColorSchemeValue()
const textColor = studioTheme.color[colorScheme][$tone].card.enabled.fg
const backgroundColor = rgba(studioTheme.color[colorScheme][$tone].card.enabled.bg, 0.8)
const toneToUse = $tone === 'prospect' || $tone === 'explore' ? 'default' : $tone
const textColor = studioTheme.color[colorScheme][toneToUse].card.enabled.fg
const backgroundColor = rgba(studioTheme.color[colorScheme][toneToUse].card.enabled.bg, 0.8)

return css`
position: absolute;
Expand Down

0 comments on commit 906d254

Please sign in to comment.