File tree Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export default function Lightbox({
34
34
onChangeImage,
35
35
onRequestClose,
36
36
rounded,
37
- scrimColor = 'auto' ,
37
+ scrim = 'auto' ,
38
38
...rest
39
39
} : LightboxProps ) {
40
40
const currentImage =
@@ -70,7 +70,7 @@ export default function Lightbox({
70
70
closeOnScrimClick = { false }
71
71
dialogClassName = "lightbox__dialog"
72
72
onRequestClose = { onRequestClose }
73
- scrimColor = { scrimColor }
73
+ scrim = { scrim }
74
74
{ ...rest }
75
75
>
76
76
< div className = "lightbox__container" >
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export type OverlayProps = {
17
17
open ?: boolean ;
18
18
reflow ?: boolean ;
19
19
rootElement ?: string ;
20
- scrimColor ?: 'auto' | 'dark' | 'light' ;
20
+ scrim ?: 'auto' | 'dark' | 'light' ;
21
21
theme ?: ThemeToken ;
22
22
} & React . ComponentPropsWithoutRef < 'div' > ;
23
23
@@ -33,17 +33,15 @@ export default function Overlay({
33
33
open = false ,
34
34
reflow = true ,
35
35
rootElement = 'body' ,
36
- scrimColor = 'dark' ,
36
+ scrim = 'dark' ,
37
37
theme,
38
38
...rest
39
39
} : OverlayProps ) {
40
40
const scrimClassNames = classNames ( 'overlay__scrim' , {
41
- 'bg-white' :
42
- scrimColor === 'light' || ( scrimColor === 'auto' && theme === 'light' ) ,
41
+ 'bg-white' : scrim === 'light' || ( scrim === 'auto' && theme === 'light' ) ,
43
42
'bg-black' :
44
- scrimColor === 'dark' ||
45
- ( scrimColor === 'auto' && theme !== 'light' && theme ) ,
46
- 'bg-background' : scrimColor === 'auto' && ! theme ,
43
+ scrim === 'dark' || ( scrim === 'auto' && theme !== 'light' && theme ) ,
44
+ 'bg-background' : scrim === 'auto' && ! theme ,
47
45
hidden : hideScrim ,
48
46
} ) ;
49
47
useBodyOverflow ( open , reflow ) ;
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export const Rounded: Story = {
88
88
89
89
export const DarkScrim : Story = {
90
90
args : {
91
- scrimColor : 'dark' ,
91
+ scrim : 'dark' ,
92
92
images : [
93
93
'https://picsum.photos/seed/10/1280/720' ,
94
94
'https://picsum.photos/seed/100/1280/720' ,
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const Default: Story = {
32
32
} ;
33
33
34
34
export const LightScrim : Story = {
35
- args : { scrimColor : 'light' } ,
35
+ args : { scrim : 'light' } ,
36
36
decorators : [ Decorator ] ,
37
37
} ;
38
38
You can’t perform that action at this time.
0 commit comments