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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button Component disabledStyle, LoadingComponent + isLoading, and throttleTimeMs #2804

Open
ChristopherGabba opened this issue Oct 15, 2024 · 0 comments

Comments

@ChristopherGabba
Copy link

I've been working with Ignite now for a while and both projects I've worked in I've ended up modifying the default Button component to include the above-mentioned properties.

<Button 
   ...
   disabledStyle={$disabled} // defined as a 5th preset in the style presets of the button component. We gray out buttons in both the apps I am building when they are disabled
   disabledTextStyle={$disabledText} // defined as a 6th preset in the style presets
   LoadingComponent={<Loader />} // the component that will show after the button is pressed to show its in a loading state (this can also put the button in a temporary disabled state)
   isLoading={true}  // shows the loading component in the center of the button
   throttleTimeMS={2000} // set how long you want to prevent a user from spamming an API call
/>

Its a feature request so not necessary to fix or anything. These are just things that I've ended up having to repeat with Ignite on more than one occasion.

@ChristopherGabba ChristopherGabba changed the title Button and TextInput Component disabledStyle, LoadingComponent + isLoading, and throttleTimeMs Button Component disabledStyle, LoadingComponent + isLoading, and throttleTimeMs Oct 15, 2024
@ChristopherGabba ChristopherGabba changed the title Button Component disabledStyle, LoadingComponent + isLoading, and throttleTimeMs Button Component disabledStyle, LoadingComponent + isLoading, and throttleTimeMs Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant