|
@@ -265,18 +265,26 @@ class Footer(ValueElement):
|
|
|
|
|
|
class PageSticky(Element):
|
|
|
|
|
|
- def __init__(self, position: PageStickyPositions = 'bottom-right', x_offset: float = 0, y_offset: float = 0) -> None:
|
|
|
+ def __init__(self,
|
|
|
+ position: PageStickyPositions = 'bottom-right',
|
|
|
+ x_offset: float = 0,
|
|
|
+ y_offset: float = 0,
|
|
|
+ *,
|
|
|
+ expand: bool = False) -> None:
|
|
|
"""Page sticky
|
|
|
|
|
|
- A sticky element that is always visible at the bottom of the page.
|
|
|
+ This element is based on Quasar's `QPageSticky <https://quasar.dev/layout/page-sticky>`_ component.
|
|
|
|
|
|
- :param position: position of the sticky element (default: `'bottom-right'`)
|
|
|
- :param x_offset: horizontal offset of the sticky element (default: `0`)
|
|
|
- :param y_offset: vertical offset of the sticky element (default: `0`)
|
|
|
+ :param position: position on the screen (default: "bottom-right")
|
|
|
+ :param x_offset: horizontal offset (default: 0)
|
|
|
+ :param y_offset: vertical offset (default: 0)
|
|
|
+ :param expand: whether to fully expand instead of shrinking to fit the content (default: ``False``)
|
|
|
"""
|
|
|
super().__init__('q-page-sticky')
|
|
|
self._props['position'] = position
|
|
|
self._props['offset'] = [x_offset, y_offset]
|
|
|
+ if expand:
|
|
|
+ self._props['expand'] = True
|
|
|
|
|
|
|
|
|
def _check_current_slot(element: Element) -> None:
|