Skip to content

Commit 17a6d1b

Browse files
authored
fix: remove duplicate props from button (#502)
1 parent a4f5464 commit 17a6d1b

File tree

6 files changed

+6
-26
lines changed

6 files changed

+6
-26
lines changed

apps/ascent/app/docs/content/components/button-group.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ Button group with loading states
256256
<Button
257257
text="Processing..."
258258
buttonType={ButtonType.PRIMARY}
259-
isLoading={true}
259+
loading={true}
260260
onClick={() => console.log('Processing')}
261261
/>
262262
</ButtonGroup>

apps/ascent/app/docs/content/components/button.mdx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,6 @@ function MyComponent() {
8181
{ content: 'React.ReactNode', hintText: 'React node' },
8282
{ content: '' },
8383
],
84-
[
85-
{
86-
content: 'isLoading',
87-
hintText:
88-
'Whether the button is in a loading state with spinner',
89-
},
90-
{ content: 'boolean', hintText: 'boolean' },
91-
{ content: 'false' },
92-
],
93-
[
94-
{
95-
content: 'isDisabled',
96-
hintText: 'Whether the button is disabled and non-interactive',
97-
},
98-
{ content: 'boolean', hintText: 'boolean' },
99-
{ content: 'false' },
100-
],
10184
[
10285
{
10386
content: 'disabled',

apps/site/src/demos/ModalDemo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ const ModalDemo = () => {
842842
? {
843843
text: config.primaryButtonText,
844844
onClick: () => alert('Primary action clicked!'),
845-
isDisabled: config.primaryButtonDisabled,
845+
disabled: config.primaryButtonDisabled,
846846
buttonType: config.primaryButtonType,
847847
}
848848
: undefined
@@ -852,7 +852,7 @@ const ModalDemo = () => {
852852
? {
853853
text: config.secondaryButtonText,
854854
onClick: () => alert('Secondary action clicked!'),
855-
isDisabled: config.secondaryButtonDisabled,
855+
disabled: config.secondaryButtonDisabled,
856856
buttonType: config.secondaryButtonType,
857857
}
858858
: undefined

apps/site/src/demos/PopoverDemo.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ const PopoverDemo = () => {
438438
text: config.primaryButtonText,
439439
onClick: () =>
440440
alert('Primary action clicked!'),
441-
isDisabled: config.primaryButtonDisabled,
441+
disabled: config.primaryButtonDisabled,
442442
buttonType: config.primaryButtonType,
443443
}
444444
: undefined
@@ -449,8 +449,7 @@ const PopoverDemo = () => {
449449
text: config.secondaryButtonText,
450450
onClick: () =>
451451
alert('Secondary action clicked!'),
452-
isDisabled:
453-
config.secondaryButtonDisabled,
452+
disabled: config.secondaryButtonDisabled,
454453
buttonType: config.secondaryButtonType,
455454
}
456455
: undefined

packages/blend/lib/components/Button/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ export type ButtonProps = {
3333
text?: string
3434
leadingIcon?: React.ReactNode
3535
trailingIcon?: React.ReactNode
36-
isLoading?: boolean
37-
isDisabled?: boolean
3836
disabled?: boolean
3937
onClick?: () => void
4038
loading?: boolean

packages/blend/lib/components/DataTable/DataTableHeader/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ const DataTableHeader = forwardRef<
530530
alignOffset={-20}
531531
secondaryAction={{
532532
onClick: onClearAllFilters,
533-
isDisabled:
533+
disabled:
534534
!searchConfig.query.trim() &&
535535
advancedFilters.length ===
536536
0,

0 commit comments

Comments
 (0)