From 2afe76834a99a615536fc6fe78e06f4e405ab4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=AC=A2?= Date: Thu, 3 Jul 2025 11:44:06 +0800 Subject: [PATCH] feat: Pass segmentedOption to component --- src/index.tsx | 16 +++------------- tests/index.test.tsx | 3 ++- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 65efdad..de918fc 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -271,23 +271,13 @@ const Segmented = React.forwardRef( }; const renderOption = (segmentedOption: SegmentedLabeledOption) => { - const { - label, - value: optionValue, - disabled: optionDisabled, - title, - } = segmentedOption; - const optionData: SegmentedLabeledOption = { - label, - value: optionValue, - disabled: optionDisabled, - title, - }; + const { value: optionValue, disabled: optionDisabled } = segmentedOption; + return ( { value: 'iOS', disabled: false, title: 'iOS', + tooltip: 'hello iOS', }; render( , );