From a7f763faf23bc5d9db94f6e8f2f52ffec25d95a2 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 18 Dec 2024 19:50:37 +0000 Subject: Add reply sorting in-thread (#7156) * Add button * Extract component * Make it work * Extract and use RadioCircle * Add tree/list setting * Prefer local state * Factor out threadViewPrefs * Fix optimistic stuff * Revert RadioButton changes * Tweak radio styles, add Menu.LabelText * Labels * Margins * Update copy --------- Co-authored-by: Eric Bailey --- src/components/Menu/index.tsx | 49 +++++++++++++++++++++++++++++++++++++ src/components/Menu/index.web.tsx | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) (limited to 'src/components/Menu') diff --git a/src/components/Menu/index.tsx b/src/components/Menu/index.tsx index 73eb9da52..d79b0ff90 100644 --- a/src/components/Menu/index.tsx +++ b/src/components/Menu/index.tsx @@ -190,6 +190,55 @@ export function ItemIcon({icon: Comp}: ItemIconProps) { ) } +export function ItemRadio({selected}: {selected: boolean}) { + const t = useTheme() + return ( + + {selected ? ( + + ) : null} + + ) +} + +export function LabelText({children}: {children: React.ReactNode}) { + const t = useTheme() + return ( + + {children} + + ) +} + export function Group({children, style}: GroupProps) { const t = useTheme() return ( diff --git a/src/components/Menu/index.web.tsx b/src/components/Menu/index.web.tsx index ab0c9d20a..bc8596218 100644 --- a/src/components/Menu/index.web.tsx +++ b/src/components/Menu/index.web.tsx @@ -304,6 +304,57 @@ export function ItemIcon({icon: Comp, position = 'left'}: ItemIconProps) { ) } +export function ItemRadio({selected}: {selected: boolean}) { + const t = useTheme() + return ( + + {selected ? ( + + ) : null} + + ) +} + +export function LabelText({children}: {children: React.ReactNode}) { + const t = useTheme() + return ( + + {children} + + ) +} + export function Group({children}: GroupProps) { return children } -- cgit 1.4.1