Commit 7b971734 authored by XieZhiXiong's avatar XieZhiXiong

chore: 接受额外的属性

parent bc180b49
......@@ -20,6 +20,7 @@ const ButtonTabs: React.FC<ButtonTabsProps> = (props) => {
extra,
defaultValue,
children,
...rest
} = props;
const initValue = 'value' in props ? props.value : defaultValue;
const [switchValue, setSwitchValue] = useState<KeyType>(initValue);
......@@ -54,6 +55,7 @@ const ButtonTabs: React.FC<ButtonTabsProps> = (props) => {
size={size}
/>
)}
{...rest}
>
<ButtonTabsContextProvider
value={{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment