|
6 | 6 | from typing import Any, Dict, Literal, Optional, Union, overload |
7 | 7 |
|
8 | 8 | from reflex.components import Component |
| 9 | +from reflex.components.core.breakpoints import Breakpoints |
9 | 10 | from reflex.event import BASE_STATE, EventType |
10 | 11 | from reflex.style import Style |
11 | 12 | from reflex.utils.imports import ImportDict |
@@ -144,6 +145,178 @@ class CommonMarginProps(Component): |
144 | 145 | """ |
145 | 146 | ... |
146 | 147 |
|
| 148 | +class CommonPaddingProps(Component): |
| 149 | + @overload |
| 150 | + @classmethod |
| 151 | + def create( # type: ignore |
| 152 | + cls, |
| 153 | + *children, |
| 154 | + p: Optional[ |
| 155 | + Union[ |
| 156 | + Breakpoints[ |
| 157 | + str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] |
| 158 | + ], |
| 159 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 160 | + Var[ |
| 161 | + Union[ |
| 162 | + Breakpoints[ |
| 163 | + str, |
| 164 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 165 | + ], |
| 166 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 167 | + ] |
| 168 | + ], |
| 169 | + ] |
| 170 | + ] = None, |
| 171 | + px: Optional[ |
| 172 | + Union[ |
| 173 | + Breakpoints[ |
| 174 | + str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] |
| 175 | + ], |
| 176 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 177 | + Var[ |
| 178 | + Union[ |
| 179 | + Breakpoints[ |
| 180 | + str, |
| 181 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 182 | + ], |
| 183 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 184 | + ] |
| 185 | + ], |
| 186 | + ] |
| 187 | + ] = None, |
| 188 | + py: Optional[ |
| 189 | + Union[ |
| 190 | + Breakpoints[ |
| 191 | + str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] |
| 192 | + ], |
| 193 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 194 | + Var[ |
| 195 | + Union[ |
| 196 | + Breakpoints[ |
| 197 | + str, |
| 198 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 199 | + ], |
| 200 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 201 | + ] |
| 202 | + ], |
| 203 | + ] |
| 204 | + ] = None, |
| 205 | + pt: Optional[ |
| 206 | + Union[ |
| 207 | + Breakpoints[ |
| 208 | + str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] |
| 209 | + ], |
| 210 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 211 | + Var[ |
| 212 | + Union[ |
| 213 | + Breakpoints[ |
| 214 | + str, |
| 215 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 216 | + ], |
| 217 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 218 | + ] |
| 219 | + ], |
| 220 | + ] |
| 221 | + ] = None, |
| 222 | + pr: Optional[ |
| 223 | + Union[ |
| 224 | + Breakpoints[ |
| 225 | + str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] |
| 226 | + ], |
| 227 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 228 | + Var[ |
| 229 | + Union[ |
| 230 | + Breakpoints[ |
| 231 | + str, |
| 232 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 233 | + ], |
| 234 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 235 | + ] |
| 236 | + ], |
| 237 | + ] |
| 238 | + ] = None, |
| 239 | + pb: Optional[ |
| 240 | + Union[ |
| 241 | + Breakpoints[ |
| 242 | + str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] |
| 243 | + ], |
| 244 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 245 | + Var[ |
| 246 | + Union[ |
| 247 | + Breakpoints[ |
| 248 | + str, |
| 249 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 250 | + ], |
| 251 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 252 | + ] |
| 253 | + ], |
| 254 | + ] |
| 255 | + ] = None, |
| 256 | + pl: Optional[ |
| 257 | + Union[ |
| 258 | + Breakpoints[ |
| 259 | + str, Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] |
| 260 | + ], |
| 261 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 262 | + Var[ |
| 263 | + Union[ |
| 264 | + Breakpoints[ |
| 265 | + str, |
| 266 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 267 | + ], |
| 268 | + Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 269 | + ] |
| 270 | + ], |
| 271 | + ] |
| 272 | + ] = None, |
| 273 | + style: Optional[Style] = None, |
| 274 | + key: Optional[Any] = None, |
| 275 | + id: Optional[Any] = None, |
| 276 | + class_name: Optional[Any] = None, |
| 277 | + autofocus: Optional[bool] = None, |
| 278 | + custom_attrs: Optional[Dict[str, Union[Var, str]]] = None, |
| 279 | + on_blur: Optional[EventType[[], BASE_STATE]] = None, |
| 280 | + on_click: Optional[EventType[[], BASE_STATE]] = None, |
| 281 | + on_context_menu: Optional[EventType[[], BASE_STATE]] = None, |
| 282 | + on_double_click: Optional[EventType[[], BASE_STATE]] = None, |
| 283 | + on_focus: Optional[EventType[[], BASE_STATE]] = None, |
| 284 | + on_mount: Optional[EventType[[], BASE_STATE]] = None, |
| 285 | + on_mouse_down: Optional[EventType[[], BASE_STATE]] = None, |
| 286 | + on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None, |
| 287 | + on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None, |
| 288 | + on_mouse_move: Optional[EventType[[], BASE_STATE]] = None, |
| 289 | + on_mouse_out: Optional[EventType[[], BASE_STATE]] = None, |
| 290 | + on_mouse_over: Optional[EventType[[], BASE_STATE]] = None, |
| 291 | + on_mouse_up: Optional[EventType[[], BASE_STATE]] = None, |
| 292 | + on_scroll: Optional[EventType[[], BASE_STATE]] = None, |
| 293 | + on_unmount: Optional[EventType[[], BASE_STATE]] = None, |
| 294 | + **props, |
| 295 | + ) -> "CommonPaddingProps": |
| 296 | + """Create the component. |
| 297 | +
|
| 298 | + Args: |
| 299 | + *children: The children of the component. |
| 300 | + p: Padding: "0" - "9" |
| 301 | + px: Padding horizontal: "0" - "9" |
| 302 | + py: Padding vertical: "0" - "9" |
| 303 | + pt: Padding top: "0" - "9" |
| 304 | + pr: Padding right: "0" - "9" |
| 305 | + pb: Padding bottom: "0" - "9" |
| 306 | + pl: Padding left: "0" - "9" |
| 307 | + style: The style of the component. |
| 308 | + key: A unique key for the component. |
| 309 | + id: The id for the component. |
| 310 | + class_name: The class name for the component. |
| 311 | + autofocus: Whether the component should take the focus once the page is loaded |
| 312 | + custom_attrs: custom attribute |
| 313 | + **props: The props of the component. |
| 314 | +
|
| 315 | + Returns: |
| 316 | + The component. |
| 317 | + """ |
| 318 | + ... |
| 319 | + |
147 | 320 | class RadixLoadingProp(Component): |
148 | 321 | @overload |
149 | 322 | @classmethod |
|
0 commit comments