Skip to content

Commit a6ed323

Browse files
committed
restore area
1 parent c6cc817 commit a6ed323

1 file changed

Lines changed: 8 additions & 28 deletions

File tree

playground/app/features/keys/components/dialogs.py

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,11 @@
1313
SPACING_SMALL,
1414
SPACING_TINY,
1515
TEXT_SIZE_LABEL,
16-
TEXT_SIZE_MEDIUM,
1716
)
1817
from app.features.keys.state import KeysState
1918
from app.shared.components.dialogs import entity_delete_dialog
2019

2120

22-
def _api_key_panel() -> rx.Component:
23-
"""Tinted, bordered panel displaying the key on a single, horizontally-scrollable line."""
24-
return rx.scroll_area(
25-
rx.text(
26-
KeysState.created_key,
27-
font_family="monospace",
28-
size=TEXT_SIZE_MEDIUM,
29-
white_space="nowrap",
30-
user_select="none",
31-
),
32-
scrollbars="horizontal",
33-
type="auto",
34-
width="100%",
35-
padding=PADDING_MEDIUM,
36-
background_color=rx.color("mauve", 2),
37-
border=f"1px solid {rx.color('mauve', 6)}",
38-
border_radius="0.5rem",
39-
)
40-
41-
4221
def keys_created_dialog() -> rx.Component:
4322
"""Dialog to display the newly created API key."""
4423
return rx.dialog.root(
@@ -48,12 +27,7 @@ def keys_created_dialog() -> rx.Component:
4827
rx.hstack(
4928
rx.icon("circle_check", size=ICON_SIZE_XL, color=rx.color("green", 9)),
5029
rx.vstack(
51-
rx.dialog.title("API key created", margin="0"),
52-
rx.dialog.description(
53-
"Your new API key is ready to use.",
54-
color=rx.color("mauve", 11),
55-
size=TEXT_SIZE_LABEL,
56-
),
30+
rx.dialog.title("Your new API key is ready to use", margin="0"),
5731
spacing=SPACING_TINY,
5832
align="start",
5933
),
@@ -78,7 +52,13 @@ def keys_created_dialog() -> rx.Component:
7852
weight="bold",
7953
color=rx.color("mauve", 11),
8054
),
81-
_api_key_panel(),
55+
rx.text_area(
56+
value=KeysState.created_key,
57+
read_only=True,
58+
width="100%",
59+
min_height="120px",
60+
size=SIZE_MEDIUM,
61+
),
8262
spacing=SPACING_SMALL,
8363
width="100%",
8464
),

0 commit comments

Comments
 (0)