Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cruise-automation/button

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cruise-automation/button

Cruise button

  • 0.0.7
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

@cruise-automation/button

Low level button component that supports Bulma styles. For usage across Cruise projects.

Usage

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.

Props

NameTypeDescription
childrenanypassed as the child(ren) to the <button> element
onClick?(e) => voidclick callback. The event will not propagate to parent elements.
primary?booleantrue to apply the is-primary class
danger?booleantrue to apply the is-danger class
small?booleantrue to apply the is-small class
large?booleantrue to apply the is-large class
primary?booleantrue to apply the is-primary class
warning?booleantrue to apply the is-warning class
danger?booleantrue to apply the is-danger class
style?objectcustom style to be applied as the style={} prop to the element
className?stringwill be appended as a custom value to the className= prop
tooltip?stringwill be set as the title= prop on the element
delay?numberif supplied, onClick will not be called until after delay milliseconds have passed. A progress bar will be displayed while the button 'charges'
progressClassName?stringoptional 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

Package last updated on 28 Dec 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc