@@ -97,15 +97,13 @@ defmodule PetalComponents.SlideOver do
97
97
|> JS . show ( to: "#slide-over" )
98
98
|> JS . show (
99
99
to: "#slide-over-overlay" ,
100
+ time: 300 ,
100
101
transition: { "transition-all transform ease-out duration-300" , "opacity-0" , "opacity-100" }
101
102
)
102
103
|> JS . show (
103
104
to: "#slide-over-content" ,
104
- transition: {
105
- "transition-all transform ease-out duration-300" ,
106
- start_class ,
107
- end_class
108
- }
105
+ time: 300 ,
106
+ transition: { "transition-all transform ease-out duration-300" , start_class , end_class }
109
107
)
110
108
|> JS . add_class ( "overflow-hidden" , to: "body" )
111
109
|> JS . focus_first ( to: "#slide-over-content" )
@@ -121,22 +119,14 @@ defmodule PetalComponents.SlideOver do
121
119
js =
122
120
JS . remove_class ( "overflow-hidden" , to: "body" )
123
121
|> JS . hide (
124
- transition: {
125
- "ease-in duration-200" ,
126
- "opacity-100" ,
127
- "opacity-0"
128
- } ,
122
+ transition: { "ease-in duration-200" , "opacity-100" , "opacity-0" } ,
129
123
to: "#slide-over-overlay"
130
124
)
131
125
|> JS . hide (
132
- transition: {
133
- "ease-in duration-200" ,
134
- start_class ,
135
- end_class
136
- } ,
126
+ transition: { "ease-in duration-200" , start_class , end_class } ,
137
127
to: "#slide-over-content"
138
128
)
139
- |> JS . hide ( to: "#slide-over" )
129
+ |> JS . hide ( to: "#slide-over" , transition: { "duration-200" , "" , "" } )
140
130
141
131
if close_slide_over_target do
142
132
JS . push ( js , "close_slide_over" , target: close_slide_over_target )
0 commit comments