Skip to content

Commit 9678716

Browse files
committed
using Literal typing form
1 parent 8769778 commit 9678716

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

chartlets.py/chartlets/components/divider.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
from dataclasses import dataclass
2+
from typing import Literal
23

34
from chartlets import Container
45

56

67
@dataclass(frozen=True)
78
class Divider(Container):
8-
"""The Divider component provides a thin,
9+
"""The `Divider` component provides a thin,
910
unobtrusive line for grouping elements to reinforce visual hierarchy.
1011
"""
1112

12-
orientation: str | None = None
13+
orientation: Literal["horizontal", "vertical"] | None = None
1314
"""The orientation. Can be `horizontal` (default) or `vertical`."""
1415

15-
variant: str | None = None
16+
variant: Literal["fullWidth", "inset", "middle"] | None = None
1617
"""The variant. One of `fullWidth ` (default), `inset`, and `middle`."""
1718

19+
textAlign: Literal["left", "center", "right"] | None = None
20+
"""Use the `textAlign` prop to align elements that are
21+
wrapped by the divider. One of `left`, `center` (default), and `right`.
22+
"""
23+
1824
flexItem: bool | None = None
1925
"""Use the `flexItem` prop to display the divider when it's being
2026
used in a flex container.
2127
"""
2228

23-
textAlign: str | None = None
24-
"""Use the `textAlign` prop to align elements that are
25-
wrapped by the divider. One of `center` (default), `left`, and `right`.
26-
"""

0 commit comments

Comments
 (0)