remove unused titleView prop
This commit is contained in:
parent
71406ae27d
commit
2bb9166546
1 changed files with 1 additions and 6 deletions
|
|
@ -36,7 +36,6 @@ export interface DialogSelectProps<T> {
|
||||||
|
|
||||||
export interface DialogSelectOption<T = any> {
|
export interface DialogSelectOption<T = any> {
|
||||||
title: string
|
title: string
|
||||||
titleView?: JSX.Element
|
|
||||||
value: T
|
value: T
|
||||||
description?: string
|
description?: string
|
||||||
footer?: JSX.Element | string
|
footer?: JSX.Element | string
|
||||||
|
|
@ -351,7 +350,6 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
|
||||||
</Show>
|
</Show>
|
||||||
<Option
|
<Option
|
||||||
title={option.title}
|
title={option.title}
|
||||||
titleView={option.titleView}
|
|
||||||
footer={flatten() ? (option.category ?? option.footer) : option.footer}
|
footer={flatten() ? (option.category ?? option.footer) : option.footer}
|
||||||
description={option.description !== category ? option.description : undefined}
|
description={option.description !== category ? option.description : undefined}
|
||||||
active={active()}
|
active={active()}
|
||||||
|
|
@ -408,7 +406,6 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
|
||||||
|
|
||||||
function Option(props: {
|
function Option(props: {
|
||||||
title: string
|
title: string
|
||||||
titleView?: JSX.Element
|
|
||||||
description?: string
|
description?: string
|
||||||
active?: boolean
|
active?: boolean
|
||||||
current?: boolean
|
current?: boolean
|
||||||
|
|
@ -439,9 +436,7 @@ function Option(props: {
|
||||||
wrapMode="none"
|
wrapMode="none"
|
||||||
paddingLeft={3}
|
paddingLeft={3}
|
||||||
>
|
>
|
||||||
<Show when={props.titleView} fallback={Locale.truncate(props.title, 61)}>
|
{Locale.truncate(props.title, 61)}
|
||||||
{(titleView) => titleView()}
|
|
||||||
</Show>
|
|
||||||
<Show when={props.description}>
|
<Show when={props.description}>
|
||||||
<span style={{ fg: props.active ? fg : theme.textMuted }}> {props.description}</span>
|
<span style={{ fg: props.active ? fg : theme.textMuted }}> {props.description}</span>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue