Skip to content

The open source coding agent.

TypeScript

fix: resolve Select children type conflict with ButtonProps

David Hillde87694867e2
diff --git a/packages/app/src/components/settings-general.tsx b/packages/app/src/components/settings-general.tsx
index 6221b253f36..4e0fa765ff9 100644
--- a/packages/app/src/components/settings-general.tsx
+++ b/packages/app/src/components/settings-general.tsx
@@ -113,7 +113,6 @@ export const SettingsGeneral: Component = () => {
size="small"
triggerStyle={{ "font-family": monoFontFamily(settings.appearance.font()), "min-width": "180px" }}
>
- {/* @ts-expect-error */}
{(option) => <span style={{ "font-family": monoFontFamily(option?.value) }}>{option?.label}</span>}
</Select>
</SettingsRow>
diff --git a/packages/ui/src/components/select.tsx b/packages/ui/src/components/select.tsx
index f7d212848ad..e334ede422b 100644
--- a/packages/ui/src/components/select.tsx
+++ b/packages/ui/src/components/select.tsx
@@ -20,7 +20,7 @@ export type SelectProps<T> = Omit<ComponentProps<typeof Kobalte<T>>, "value" | "
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, [
"class",
"classList",