Spaces:
Sleeping
Sleeping
Update testnavbar.py
Browse files- testnavbar.py +3 -3
testnavbar.py
CHANGED
|
@@ -69,13 +69,13 @@ def ProductCard(p):
|
|
| 69 |
# discoverability of class options.
|
| 70 |
# bold_sm is helpful for things that you want to look like regular text, but stand out
|
| 71 |
# visually for emphasis.
|
| 72 |
-
|
| 73 |
# ButtonT.primary is useful for actions you really want the user to take (like adding
|
| 74 |
# something to the cart) - these stand out visually. For dangerous actions (like
|
| 75 |
# deleting something) you generally would want to use ButtonT.destructive. For UX actions
|
| 76 |
# that aren't a goal of the page (like cancelling something that hasn't been submitted)
|
| 77 |
# you generally want the default styling.
|
| 78 |
-
Button("
|
| 79 |
# HTMX can be used as normal on any component
|
| 80 |
hx_get=product_detail.to(product_name=p['name']),
|
| 81 |
hx_push_url='true',
|
|
@@ -106,7 +106,7 @@ def product_detail(product_name: str):
|
|
| 106 |
H3(product_name),
|
| 107 |
# render_md is a helper that renders markdown into HTML using frankenui styles.
|
| 108 |
#render_md(example_product_description.format(product_name=product_name))
|
| 109 |
-
example_product_description.format(product_name=product_name)
|
| 110 |
),
|
| 111 |
Div(
|
| 112 |
H3("Order Form"),
|
|
|
|
| 69 |
# discoverability of class options.
|
| 70 |
# bold_sm is helpful for things that you want to look like regular text, but stand out
|
| 71 |
# visually for emphasis.
|
| 72 |
+
p["price"], cls=(TextPresets.bold_sm, "text-gray-700 mt-1"),
|
| 73 |
# ButtonT.primary is useful for actions you really want the user to take (like adding
|
| 74 |
# something to the cart) - these stand out visually. For dangerous actions (like
|
| 75 |
# deleting something) you generally would want to use ButtonT.destructive. For UX actions
|
| 76 |
# that aren't a goal of the page (like cancelling something that hasn't been submitted)
|
| 77 |
# you generally want the default styling.
|
| 78 |
+
Button("Add to cart", cls=(ButtonT.primary, "mt-2"),
|
| 79 |
# HTMX can be used as normal on any component
|
| 80 |
hx_get=product_detail.to(product_name=p['name']),
|
| 81 |
hx_push_url='true',
|
|
|
|
| 106 |
H3(product_name),
|
| 107 |
# render_md is a helper that renders markdown into HTML using frankenui styles.
|
| 108 |
#render_md(example_product_description.format(product_name=product_name))
|
| 109 |
+
P(example_product_description.format(product_name=product_name))
|
| 110 |
),
|
| 111 |
Div(
|
| 112 |
H3("Order Form"),
|