Skip to content

Commit

Permalink
fix(sanity): use correct color scheme in image input overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
juice49 committed Sep 30, 2024
1 parent d0710bc commit 2eb20ff
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Card, type CardTone, Flex, rgba, studioTheme} from '@sanity/ui'
import {useColorSchemeValue} from 'sanity'
import {css, styled} from 'styled-components'

export const RatioBox = styled(Card)`
Expand All @@ -20,8 +21,9 @@ export const RatioBox = styled(Card)`
export const Overlay = styled(Flex)<{
$tone: Exclude<CardTone, 'inherit'>
}>(({$tone}) => {
const textColor = studioTheme.color.light[$tone].card.enabled.fg
const backgroundColor = rgba(studioTheme.color.light[$tone].card.enabled.bg, 0.8)
const colorScheme = useColorSchemeValue()
const textColor = studioTheme.color[colorScheme][$tone].card.enabled.fg
const backgroundColor = rgba(studioTheme.color[colorScheme][$tone].card.enabled.bg, 0.8)

return css`
position: absolute;
Expand Down

0 comments on commit 2eb20ff

Please sign in to comment.