Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LoadingButton component analogous for Joy UI #33999

Closed
2 tasks done
roman-vanesyan opened this issue Aug 20, 2022 · 3 comments 路 Fixed by #34658
Closed
2 tasks done

Add LoadingButton component analogous for Joy UI #33999

roman-vanesyan opened this issue Aug 20, 2022 · 3 comments 路 Fixed by #34658
Assignees
Labels
component: LoadingButton The React component. new feature New feature or request package: joy-ui Specific to @mui/joy

Comments

@roman-vanesyan
Copy link

roman-vanesyan commented Aug 20, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 馃挕

LoadingButton component analogous for Joy UI. Either built in into the current Button component as optional properties (loading, loadingIndicator, etc.) as dedicated component like it's current presented for material UI.

Examples 馃寛

https://mui.com/material-ui/react-button/#loading-button

Motivation 馃敠

My use case is simple enough, whenever some async action is happening that was triggered by button click, button state should be changed to loading state until action is done.

@roman-vanesyan roman-vanesyan added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 20, 2022
@roman-vanesyan roman-vanesyan changed the title LoadingButton for Joy UI LoadingButton component analogous for Joy UI Aug 20, 2022
@michaldudak michaldudak added the component: LoadingButton The React component. label Aug 22, 2022
@siriwatknp
Copy link
Member

The LoadingButton will be a prop instead of a new component like this:

<Button loading loadingPosition>...</Button>

We are working on the CircularProgress component (#33869) that will be used as a default loader.

For a workaround, you can create a custom loader like this: https://codesandbox.io/s/blissful-tereshkova-61w5xu?file=/demo.tsx

@danilo-leal danilo-leal added package: joy-ui Specific to @mui/joy new feature New feature or request and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 23, 2022
@danilo-leal danilo-leal changed the title LoadingButton component analogous for Joy UI Add LoadingButton component analogous for Joy UI Aug 23, 2022
@kushagra010
Copy link
Contributor

@siriwatknp can this be picked? as CircularProgress component (#33869) is merged.

@siriwatknp
Copy link
Member

@siriwatknp can this be picked? as CircularProgress component (#33869) is merged.

Thanks! feel free to submit a PR. I propose that the loading should be a prop of the existing Button.

<Button loading />

The APIs can be the same as Material UI's LoadingButton:

<Button loading loadingIndicator={} loadingPosition="" />

Let me know if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: LoadingButton The React component. new feature New feature or request package: joy-ui Specific to @mui/joy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants