From 7969fd9d38275c6dbad0d80d2b84c8e8e365dfa4 Mon Sep 17 00:00:00 2001 From: Sebastian Sebald Date: Wed, 14 Feb 2024 15:44:15 +0100 Subject: [PATCH] fix: add placeholder prop to `Combobox` types (#3715) * fix: add placeholder to `Combobox` * add to docu * Create spicy-planes-warn.md --- .changeset/spicy-planes-warn.md | 6 ++++++ docs/content/components/form/combobox/combobox.mdx | 6 ++++++ packages/components/src/ComboBox/ComboBox.tsx | 1 + 3 files changed, 13 insertions(+) create mode 100644 .changeset/spicy-planes-warn.md diff --git a/.changeset/spicy-planes-warn.md b/.changeset/spicy-planes-warn.md new file mode 100644 index 0000000000..8d454bf06b --- /dev/null +++ b/.changeset/spicy-planes-warn.md @@ -0,0 +1,6 @@ +--- +"@marigold/docs": patch +"@marigold/components": patch +--- + +fix: add placeholder prop to `Combobox` types diff --git a/docs/content/components/form/combobox/combobox.mdx b/docs/content/components/form/combobox/combobox.mdx index d1cdb32ba3..d8dd3dbb89 100644 --- a/docs/content/components/form/combobox/combobox.mdx +++ b/docs/content/components/form/combobox/combobox.mdx @@ -32,6 +32,12 @@ import { ComboBox } from '@marigold/components'; description: "The label text. If you don't want to visually display a label, provide an `aria-label` or `aria-labelledby` attribute for accessibility.", }, + { + property: 'placeholder', + type: 'string', + description: 'Set the placeholder for the select.', + default: 'none', + }, { property: 'defaultValue', type: 'string', diff --git a/packages/components/src/ComboBox/ComboBox.tsx b/packages/components/src/ComboBox/ComboBox.tsx index ecdfcae77c..11f87dc3b0 100644 --- a/packages/components/src/ComboBox/ComboBox.tsx +++ b/packages/components/src/ComboBox/ComboBox.tsx @@ -44,6 +44,7 @@ export interface ComboBoxProps value?: RAC.ComboBoxProps['inputValue']; onChange?: RAC.ComboBoxProps['onInputChange']; children: ReactNode | ((item: any) => ReactNode); + placeholder?: string; } interface ComboBoxComponent