fix: resolve Select children type conflict with ButtonProps
This commit is contained in:
@@ -113,7 +113,6 @@ export const SettingsGeneral: Component = () => {
|
|||||||
size="small"
|
size="small"
|
||||||
triggerStyle={{ "font-family": monoFontFamily(settings.appearance.font()), "min-width": "180px" }}
|
triggerStyle={{ "font-family": monoFontFamily(settings.appearance.font()), "min-width": "180px" }}
|
||||||
>
|
>
|
||||||
{/* @ts-expect-error */}
|
|
||||||
{(option) => <span style={{ "font-family": monoFontFamily(option?.value) }}>{option?.label}</span>}
|
{(option) => <span style={{ "font-family": monoFontFamily(option?.value) }}>{option?.label}</span>}
|
||||||
</Select>
|
</Select>
|
||||||
</SettingsRow>
|
</SettingsRow>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export type SelectProps<T> = Omit<ComponentProps<typeof Kobalte<T>>, "value" | "
|
|||||||
triggerVariant?: "default" | "button"
|
triggerVariant?: "default" | "button"
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Select<T>(props: SelectProps<T> & ButtonProps) {
|
export function Select<T>(props: SelectProps<T> & Omit<ButtonProps, "children">) {
|
||||||
const [local, others] = splitProps(props, [
|
const [local, others] = splitProps(props, [
|
||||||
"class",
|
"class",
|
||||||
"classList",
|
"classList",
|
||||||
|
|||||||
Reference in New Issue
Block a user