Skip to content

Commit 128eedd

Browse files
committed
docs(Button): update group description
1 parent 015c14e commit 128eedd

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

docs/en/component/button.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ export interface ButtonProps extends AbstractButtonProps<ButtonRef> {
7878
}
7979
8080
export interface ButtonGroupProps extends Omit<AbstractButtonProps<ButtonGroupRef>, 'onChange'> {
81-
value?: any[]
81+
value?: any
8282
classNames?: { button?: string }
8383
styles?: { button?: React.CSSProperties }
84-
onChange?: (values: any[]) => void
84+
onChange?: (values: any) => void
8585
}
8686
8787
export interface ButtonRef extends HTMLButtonElement {}

docs/src/components/APITable/Button.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ export const ButtonGroupAPITable = () => {
5353
const data: APITableDataType[] = [
5454
{
5555
attribute: 'value',
56-
description: 'The value associated with the button group',
57-
type: <Code>any[]</Code>,
56+
description:
57+
'The value associated with the button group. If the value is an array, the button group will be treated as a multi-select group. Otherwise, it will be treated as a single-select group.',
58+
type: <Code>any</Code>,
5859
default: '-',
5960
},
6061
{
@@ -90,7 +91,7 @@ export const ButtonGroupAPITable = () => {
9091
{
9192
attribute: 'onChange',
9293
description: 'Callback function when options change',
93-
type: <Code>{`(values: any[]) => void`}</Code>,
94+
type: <Code>{`(values: any) => void`}</Code>,
9495
default: '-',
9596
},
9697
]

docs/zh/component/button.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ export interface ButtonProps extends AbstractButtonProps<ButtonRef> {
7878
}
7979
8080
export interface ButtonGroupProps extends Omit<AbstractButtonProps<ButtonGroupRef>, 'onChange'> {
81-
value?: any[]
81+
value?: any
8282
classNames?: { button?: string }
8383
styles?: { button?: React.CSSProperties }
84-
onChange?: (values: any[]) => void
84+
onChange?: (values: any) => void
8585
}
8686
8787
export interface ButtonRef extends HTMLButtonElement {}

0 commit comments

Comments
 (0)