@@ -124,13 +124,13 @@ class DrawerContent(DrawerComponent):
124124 alias = "Vaul" + tag
125125
126126 # Style set partially based on the source code at https://ui.shadcn.com/docs/components/drawer
127- def _get_style (self ) -> dict :
127+ def add_style (self ) -> dict :
128128 """Get the style for the component.
129129
130130 Returns:
131131 The dictionary of the component style as value and the style notation as key.
132132 """
133- base_style = {
133+ return {
134134 "left" : "0" ,
135135 "right" : "0" ,
136136 "bottom" : "0" ,
@@ -139,9 +139,6 @@ def _get_style(self) -> dict:
139139 "z_index" : 50 ,
140140 "display" : "flex" ,
141141 }
142- style = self .style or {}
143- base_style .update (style )
144- return {"css" : base_style }
145142
146143 # Fired when the drawer content is opened.
147144 on_open_auto_focus : EventHandler [no_args_event_spec ]
@@ -186,13 +183,13 @@ class DrawerOverlay(DrawerComponent):
186183 alias = "Vaul" + tag
187184
188185 # Style set based on the source code at https://ui.shadcn.com/docs/components/drawer
189- def _get_style (self ) -> dict :
186+ def add_style (self ) -> dict :
190187 """Get the style for the component.
191188
192189 Returns:
193190 The dictionary of the component style as value and the style notation as key.
194191 """
195- base_style = {
192+ return {
196193 "position" : "fixed" ,
197194 "left" : "0" ,
198195 "right" : "0" ,
@@ -201,9 +198,6 @@ def _get_style(self) -> dict:
201198 "z_index" : 50 ,
202199 "background" : "rgba(0, 0, 0, 0.5)" ,
203200 }
204- style = self .style or {}
205- base_style .update (style )
206- return {"css" : base_style }
207201
208202
209203class DrawerClose (DrawerTrigger ):
@@ -222,21 +216,18 @@ class DrawerTitle(DrawerComponent):
222216 alias = "Vaul" + tag
223217
224218 # Style set based on the source code at https://ui.shadcn.com/docs/components/drawer
225- def _get_style (self ) -> dict :
219+ def add_style (self ) -> dict :
226220 """Get the style for the component.
227221
228222 Returns:
229223 The dictionary of the component style as value and the style notation as key.
230224 """
231- base_style = {
225+ return {
232226 "font-size" : "1.125rem" ,
233227 "font-weight" : "600" ,
234- "line-weight " : "1" ,
228+ "line-height " : "1" ,
235229 "letter-spacing" : "-0.05em" ,
236230 }
237- style = self .style or {}
238- base_style .update (style )
239- return {"css" : base_style }
240231
241232
242233class DrawerDescription (DrawerComponent ):
@@ -247,18 +238,15 @@ class DrawerDescription(DrawerComponent):
247238 alias = "Vaul" + tag
248239
249240 # Style set based on the source code at https://ui.shadcn.com/docs/components/drawer
250- def _get_style (self ) -> dict :
241+ def add_style (self ) -> dict :
251242 """Get the style for the component.
252243
253244 Returns:
254245 The dictionary of the component style as value and the style notation as key.
255246 """
256- base_style = {
247+ return {
257248 "font-size" : "0.875rem" ,
258249 }
259- style = self .style or {}
260- base_style .update (style )
261- return {"css" : base_style }
262250
263251
264252class DrawerHandle (DrawerComponent ):
0 commit comments