
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
@vlsergey/react-bootstrap-button-with-spinner
Advanced tools
Wrapper around React Bootstrap Button component with spinner and auto-disabled functionality (to prevent doubleclick)
Ready-to-use wrapper for react-bootstrap Button component. Automatically disables button and displays spinner inside until async onClick
handler is completed. I.e. until Promise
returned by onClick
is resolved or rejected.
npm i --save @vlsergey/react-bootstrap-button-with-spinner
or
npm i --save-dev @vlsergey/react-bootstrap-button-with-spinner
// Replace 'import Button from "react-bootstrap/Button"' with"
import Button from "@vlsergey/react-bootstrap-button-with-spinner"
<Button onClick={this.handleClick}>Button text</Button>
Component is a drop-in replacement for React Bootstrap Button component.
No additional configuration is required.
onClick
handle does not need to be async, i.e. is not required to return Promise. But auto-disable/auto-spinner functionality will work only if handler is async. In other cases it will fallback to original functionality of Button.
Property | Default value | Description |
---|---|---|
spinner | <Spinner animation="border" aria-hidden="true" as="span" role="status" size="sm" {...spinnerProps} /> | Allow to replace default Spinner with something else |
spinnerProps | {} | Allow to override default Spinner properties. |
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.