From 6a43777cd78579cdf0963ec60af6e3cb738411fa Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 18 Dec 2024 12:53:39 -0600 Subject: [PATCH] Tweak radio styles, add Menu.LabelText --- src/components/Menu/index.tsx | 49 ++++++++++++++++++++++++ src/components/Menu/index.web.tsx | 51 +++++++++++++++++++++++++ src/view/com/post-thread/PostThread.tsx | 23 ++++++----- 3 files changed, 114 insertions(+), 9 deletions(-) diff --git a/src/components/Menu/index.tsx b/src/components/Menu/index.tsx index 73eb9da526..d5b27679d6 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 ab0c9d20a1..bc8596218c 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 } diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 53f590eef5..dfe183d958 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -42,7 +42,6 @@ import {Header} from '#/components/Layout' import {ListFooter, ListMaybePlaceholder} from '#/components/Lists' import * as Menu from '#/components/Menu' import {Text} from '#/components/Typography' -import {RadioCircle} from '../util/forms/RadioButton' import {PostThreadComposePrompt} from './PostThreadComposePrompt' import {PostThreadItem} from './PostThreadItem' import {PostThreadLoadMore} from './PostThreadLoadMore' @@ -530,7 +529,7 @@ export function PostThread({uri}: {uri: string | undefined}) { return ( <> - + @@ -619,6 +618,9 @@ let ThreadMenu = ({ )} + + Thread display + Show replies as a list - + Show replies as a tree - + + + Reply sorting + Hot replies first - + Oldest replies first - + Newest replies first - + Most-liked replies first - + Random (aka "Poster's Roulette") - +