base.py 886 B

12345678910111213141516171819202122232425
  1. """Declarative layout and common spacing props."""
  2. from __future__ import annotations
  3. from typing import Literal
  4. from reflex.components.core.breakpoints import Responsive
  5. from reflex.vars.base import Var
  6. from ..base import CommonMarginProps, CommonPaddingProps, RadixThemesComponent
  7. LiteralBoolNumber = Literal["0", "1"]
  8. class LayoutComponent(CommonMarginProps, CommonPaddingProps, RadixThemesComponent):
  9. """Box, Flex and Grid are foundational elements you'll use to construct
  10. layouts. Box provides block-level spacing and sizing, while Flex and Grid
  11. let you create flexible columns, rows and grids.
  12. """
  13. # Whether the element will take up the smallest possible space: "0" | "1"
  14. flex_shrink: Var[Responsive[LiteralBoolNumber]]
  15. # Whether the element will take up the largest possible space: "0" | "1"
  16. flex_grow: Var[Responsive[LiteralBoolNumber]]