From 78a377b85253c5fa58d9397c7592bf24ddae47b5 Mon Sep 17 00:00:00 2001 From: Benny Joo Date: Thu, 27 Apr 2023 10:38:27 +0100 Subject: [PATCH 1/4] [Option][base] Drop component prop --- docs/pages/base/api/option.json | 1 - .../api-docs-base/option/option.json | 1 - packages/mui-base/src/Option/Option.spec.tsx | 34 +++++++++++++++---- packages/mui-base/src/Option/Option.test.tsx | 1 + packages/mui-base/src/Option/Option.tsx | 18 ++-------- packages/mui-base/src/Option/Option.types.ts | 16 +++------ 6 files changed, 35 insertions(+), 36 deletions(-) diff --git a/docs/pages/base/api/option.json b/docs/pages/base/api/option.json index b88094c4f9055f..3c5bfc442c44e2 100644 --- a/docs/pages/base/api/option.json +++ b/docs/pages/base/api/option.json @@ -1,7 +1,6 @@ { "props": { "value": { "type": { "name": "any" }, "required": true }, - "component": { "type": { "name": "elementType" } }, "disabled": { "type": { "name": "bool" }, "default": "false" }, "label": { "type": { "name": "string" } }, "slotProps": { diff --git a/docs/translations/api-docs-base/option/option.json b/docs/translations/api-docs-base/option/option.json index 9242960c42375e..934b7f4c1c0387 100644 --- a/docs/translations/api-docs-base/option/option.json +++ b/docs/translations/api-docs-base/option/option.json @@ -1,7 +1,6 @@ { "componentDescription": "An unstyled option to be used within a Select.", "propDescriptions": { - "component": "The component used for the root node. Either a string to use a HTML element or a component.", "disabled": "If true, the option will be disabled.", "label": "A text representation of the option's content. Used for keyboard text navigation matching.", "slotProps": "The props used for each slot inside the Option.", diff --git a/packages/mui-base/src/Option/Option.spec.tsx b/packages/mui-base/src/Option/Option.spec.tsx index c8e7aeaa33a537..ea49a8871a5782 100644 --- a/packages/mui-base/src/Option/Option.spec.tsx +++ b/packages/mui-base/src/Option/Option.spec.tsx @@ -24,21 +24,43 @@ const polymorphicComponentTest = () => { {/* @ts-expect-error */}