This commit is contained in:
Eric Bailey
2024-03-05 12:48:07 -06:00
parent baba077e37
commit f1f8b2dd65
3 changed files with 32 additions and 3 deletions
+4 -1
View File
@@ -117,7 +117,9 @@ export function Item({children, label, style, onPress}: ItemProps) {
a.gap_sm,
a.p_md,
a.rounded_md,
a.border,
t.atoms.bg_contrast_25,
t.atoms.border_contrast_low,
{minHeight: 48},
style,
(focused || pressed) && [t.atoms.bg_contrast_50],
@@ -135,7 +137,7 @@ export function ItemText({children, style}: ItemTextProps) {
a.text_md,
a.font_bold,
t.atoms.text_contrast_medium,
{paddingTop: 2},
{paddingTop: 3},
style,
]}>
{children}
@@ -170,6 +172,7 @@ export function Group({children, style}: GroupProps) {
// @ts-ignore
style: {
borderRadius: 0,
borderWidth: 0,
},
})}
</React.Fragment>
+7 -1
View File
@@ -121,7 +121,13 @@ export function Outer({children}: React.PropsWithChildren<{}>) {
return (
<DropdownMenu.Portal>
<DropdownMenu.Content sideOffset={5} loop aria-label="Test">
<View style={[a.rounded_sm, a.p_xs, t.atoms.bg_contrast_50]}>
<View
style={[
a.rounded_sm,
a.p_xs,
t.atoms.bg_contrast_50,
t.atoms.shadow_md,
]}>
{children}
</View>
+21 -1
View File
@@ -43,7 +43,20 @@ export function Menus() {
<Menu.ItemText>Click me</Menu.ItemText>
</Menu.Item>
<Menu.Divider />
<Menu.Item
label="Another item"
onPress={() => menuControl.close()}>
<Menu.ItemText>Another item</Menu.ItemText>
</Menu.Item>
</Menu.Group>
<Menu.Divider />
<Menu.Group>
<Menu.Item label="Click me" onPress={() => {}}>
<Menu.ItemIcon icon={Search} />
<Menu.ItemText>Click me</Menu.ItemText>
</Menu.Item>
<Menu.Item
label="Another item"
@@ -51,6 +64,13 @@ export function Menus() {
<Menu.ItemText>Another item</Menu.ItemText>
</Menu.Item>
</Menu.Group>
<Menu.Divider />
<Menu.Item label="Click me" onPress={() => {}}>
<Menu.ItemIcon icon={Search} />
<Menu.ItemText>Click me</Menu.ItemText>
</Menu.Item>
</Menu.Outer>
</Menu.Root>
</View>