Skip to content

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

@ChristopherGabba

Description

@ChristopherGabba

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions