UNPKG

cpui-components

Version:

35 lines (31 loc) 843 B
# ButtonDropdown Renders a standard button with a drop-downlist of secondary options. The drop-down button uses the child elements of the `ButtonDropdown` element to create the drop-down list. The first child element is considered the "Primary" button (i.e. the one that is clicked by default). Subsequent buttons are placed in the dropdown list. # Example ```js <ButtonDropdown ref={buttonDropdown => (this.buttonDropdown = buttonDropdown) } id="something" className="cp-Btn--slim" > <Button type="primary" id="newDefault" href="http://www.google.com" newWindow={true} > New </Button> <Button onClick={() => alert("doing something")}> Wrapped </Button> <Button href="https://www.civicplus.com" type="primary"> Push me </Button> </ButtonDropdown> ); ```