@@ -31,6 +31,7 @@ import {
31
31
} from '~/providers'
32
32
33
33
import { PresentSheet } from '../../sheet'
34
+ import { ModalBEM } from './bem'
34
35
35
36
const microReboundPreset : Spring = {
36
37
type : 'spring' ,
@@ -174,6 +175,7 @@ export const Modal: Component<{
174
175
< Dialog . Content asChild >
175
176
< div
176
177
className = { clsxm (
178
+ ModalBEM . root ,
177
179
'fixed inset-0 z-[20] overflow-auto' ,
178
180
modalContainerClassName ,
179
181
) }
@@ -197,6 +199,7 @@ export const Modal: Component<{
197
199
< Dialog . Content asChild >
198
200
< div
199
201
className = { clsxm (
202
+ ModalBEM . root ,
200
203
'fixed inset-0 z-[20] flex items-center justify-center' ,
201
204
modalContainerClassName ,
202
205
) }
@@ -209,9 +212,10 @@ export const Modal: Component<{
209
212
animate = { animateController }
210
213
transition = { microReboundPreset }
211
214
className = { clsxm (
215
+ ModalBEM . content ,
212
216
'relative flex flex-col overflow-hidden rounded-lg' ,
213
- 'bg-zinc-50/80 dark:bg-neutral-900 /80' ,
214
- 'p-2 shadow-2xl shadow-stone -300 backdrop-blur-sm dark:shadow-stone -800' ,
217
+ 'bg-zinc-50/80 dark:bg-zinc-950 /80' ,
218
+ 'p-2 shadow-2xl shadow-gray -300 backdrop-blur-sm dark:shadow-gray -800/50 ' ,
215
219
max
216
220
? 'h-[90vh] w-[90vw]'
217
221
: 'max-h-[70vh] min-w-[300px] max-w-[90vw] lg:max-h-[calc(100vh-20rem)] lg:max-w-[70vw]' ,
@@ -221,18 +225,22 @@ export const Modal: Component<{
221
225
) }
222
226
onClick = { stopPropagation }
223
227
>
224
- < Dialog . Title className = "flex-shrink-0 px-4 py-2 text-lg font-medium" >
228
+ < Dialog . Title
229
+ className = { `${ ModalBEM . title } flex-shrink-0 px-4 py-2 text-lg font-medium` }
230
+ >
225
231
{ title }
226
232
</ Dialog . Title >
227
233
< Divider className = "my-2 flex-shrink-0 border-slate-200 opacity-80 dark:border-neutral-800" />
228
234
229
- < div className = "min-h-0 flex-shrink flex-grow overflow-auto px-4 py-2" >
235
+ < div
236
+ className = { `${ ModalBEM . children } min-h-0 flex-shrink flex-grow overflow-auto px-4 py-2` }
237
+ >
230
238
{ finalChildren }
231
239
</ div >
232
240
233
241
< Dialog . DialogClose
234
242
onClick = { close }
235
- className = " absolute right-0 top-0 z-[9] p-5"
243
+ className = { ` ${ ModalBEM . close } absolute right-0 top-0 z-[9] p-5` }
236
244
>
237
245
< CloseIcon />
238
246
</ Dialog . DialogClose >
0 commit comments