Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@cruise-automation/button
Advanced tools
Low level button component that supports Bulma styles. For usage across Cruise projects.
Install: npm install --save @cruise-automation/button
.
If the button is passed an onClick
callback the event will have its propagation stopped before the callback is called. This is because 95% of the time you don't want the event to propagate and can be the source of subtle bugs. If you want the click to propagate, do not supply an onClick
handler and wrap the component in a container element with an onClick
handler such as a span or div.
Name | Type | Description |
---|---|---|
children | any | passed as the child(ren) to the <button> element |
onClick? | (e) => void | click callback. The event will not propagate to parent elements. |
primary? | boolean | true to apply the is-primary class |
danger? | boolean | true to apply the is-danger class |
small? | boolean | true to apply the is-small class |
large? | boolean | true to apply the is-large class |
primary? | boolean | true to apply the is-primary class |
warning? | boolean | true to apply the is-warning class |
danger? | boolean | true to apply the is-danger class |
style? | object | custom style to be applied as the style={} prop to the element |
className? | string | will be appended as a custom value to the className= prop |
tooltip? | string | will be set as the title= prop on the element |
delay? | number | if supplied, onClick will not be called until after delay milliseconds have passed. A progress bar will be displayed while the button 'charges' |
progressClassName? | string | optional additional css class to apply to the progress bar |
progressStyle? | { [string]: any } | optional style properties to apply to the progress bar's style prop |
progressDirection? | "vertical" or "horizontal" | by default the value is "vertical", supply "horizontal" to grow the progress bar left-to-right instead of bottom-to-top |
FAQs
Cruise button
The npm package @cruise-automation/button receives a total of 3 weekly downloads. As such, @cruise-automation/button popularity was classified as not popular.
We found that @cruise-automation/button demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.