@ygor-ui/presets
Version:
Panda CSS presets for Ark UI components
58 lines (56 loc) • 1.27 kB
text/typescript
import { dialogAnatomy } from '@ark-ui/react'
import { defineSlotRecipe } from '@pandacss/dev'
export const dialog = defineSlotRecipe({
className: 'dialog',
description: 'A dialog style',
slots: dialogAnatomy.keys(),
base: {
backdrop: {
backdropFilter: 'blur(4px)',
background: {
// TODO: replace when supported in Panda: bg.canvas/80
base: 'rgba(250, 250, 250, 0.8)',
_dark: 'rgba(10, 10, 10, 0.8)',
},
inset: '0',
position: 'fixed',
zIndex: 'overlay',
_open: {
animation: 'backdrop-in',
},
_closed: {
animation: 'backdrop-out',
},
},
container: {
alignItems: 'center',
display: 'flex',
inset: '0',
justifyContent: 'center',
position: 'fixed',
zIndex: 'modal',
},
content: {
background: 'bg.default',
borderRadius: 'l3',
borderWidth: '1px',
boxShadow: 'lg',
minW: 'sm',
position: 'relative',
_open: {
animation: 'dialog-in',
},
_closed: {
animation: 'dialog-out',
},
},
title: {
fontWeight: 'semibold',
textStyle: 'lg',
},
description: {
color: 'fg.muted',
textStyle: 'sm',
},
},
})