Function
sidebar_item
(
text: str, icon: str, href: str
)
Source from the content-addressed store, hash-verified
| 102 | |
| 103 | |
| 104 | def sidebar_item( |
| 105 | text: str, icon: str, href: str |
| 106 | ) -> rx.Component: |
| 107 | return rx.link( |
| 108 | rx.hstack( |
| 109 | rx.icon(icon), |
| 110 | rx.text(text, size="4"), |
| 111 | width="100%", |
| 112 | padding_x="0.5rem", |
| 113 | padding_y="0.75rem", |
| 114 | align="center", |
| 115 | style={ |
| 116 | "_hover": { |
| 117 | "bg": rx.color("accent", 4), |
| 118 | "color": rx.color("accent", 11), |
| 119 | }, |
| 120 | "border-radius": "0.5em", |
| 121 | }, |
| 122 | ), |
| 123 | href=href, |
| 124 | underline="none", |
| 125 | weight="medium", |
| 126 | width="100%", |
| 127 | ) |
| 128 | |
| 129 | |
| 130 | def sidebar_items() -> rx.Component: |
Tested by
no test coverage detected