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 Oct 1, 2024
1 parent 1aaf760 commit 48f8da7
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 48f8da7

Please sign in to comment.