-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lab][LoadingButton] LoadingButton now inherits props from ButtonGroup (
#39679) Signed-off-by: Lucas Hilgert <[email protected]> Co-authored-by: Marija Najdova <[email protected]> Co-authored-by: ZeeshanTamboli <[email protected]>
- Loading branch information
1 parent
b6f2e48
commit 2a0063a
Showing
10 changed files
with
103 additions
and
4 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
docs/data/material/components/button-group/LoadingButtonGroup.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as React from 'react'; | ||
import ButtonGroup from '@mui/material/ButtonGroup'; | ||
import Button from '@mui/material/Button'; | ||
import LoadingButton from '@mui/lab/LoadingButton'; | ||
import SaveIcon from '@mui/icons-material/Save'; | ||
|
||
export default function LoadingButtonGroup() { | ||
return ( | ||
<ButtonGroup variant="outlined" aria-label="loading button group"> | ||
<Button>Submit</Button> | ||
<LoadingButton>Fetch data</LoadingButton> | ||
<LoadingButton loading loadingPosition="start" startIcon={<SaveIcon />}> | ||
Save | ||
</LoadingButton> | ||
</ButtonGroup> | ||
); | ||
} |
17 changes: 17 additions & 0 deletions
17
docs/data/material/components/button-group/LoadingButtonGroup.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as React from 'react'; | ||
import ButtonGroup from '@mui/material/ButtonGroup'; | ||
import Button from '@mui/material/Button'; | ||
import LoadingButton from '@mui/lab/LoadingButton'; | ||
import SaveIcon from '@mui/icons-material/Save'; | ||
|
||
export default function LoadingButtonGroup() { | ||
return ( | ||
<ButtonGroup variant="outlined" aria-label="loading button group"> | ||
<Button>Submit</Button> | ||
<LoadingButton>Fetch data</LoadingButton> | ||
<LoadingButton loading loadingPosition="start" startIcon={<SaveIcon />}> | ||
Save | ||
</LoadingButton> | ||
</ButtonGroup> | ||
); | ||
} |
7 changes: 7 additions & 0 deletions
7
docs/data/material/components/button-group/LoadingButtonGroup.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<ButtonGroup variant="outlined" aria-label="loading button group"> | ||
<Button>Submit</Button> | ||
<LoadingButton>Fetch data</LoadingButton> | ||
<LoadingButton loading loadingPosition="start" startIcon={<SaveIcon />}> | ||
Save | ||
</LoadingButton> | ||
</ButtonGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters