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 committed Oct 15, 2024
1 parent 80caab3 commit 327ce6d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 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
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {memo, useCallback, useMemo, useState} from 'react'
import {
type DocumentActionComponent,
type DocumentActionDescription,
Hotkeys,
type DocumentActionProps,
Hotkeys,
isBundleDocument,
LATEST,
ReleaseActions,
Expand Down

0 comments on commit 327ce6d

Please sign in to comment.