material-ui-split-button
Split button component for the Material-UI library
Installation
npm install material-ui-split-button --save
Usage
To embed the button anywhere on your page:
<MuiSplitButton
renderMenu={({ handleClose }) => {
<MenuItem
button
onClick={handleClose}
>
<ListItemText
primary="Click me to close the menu"
/>
</MenuItem>
}}
>
Button Text Goes Here
</MuiSplitButton>
Please refer to src/demo
for examples.
Options
Any properties not listed here will be spread to the underlying Button component
Name | Type | Description | Default |
---|
renderMenu | function | (required) Render prop used for displaying the menu. The **handleClose** method is passed to this, which closes the menu | |
position | string | (optional) The position of the menu button - can be either **left** or **right** | right |
MenuButtonProps | object | (optional) Properties to pass to the menu button component. See https://material-ui.com/api/button/ | {} |
MenuProps | object | (optional) Properties to pass to the menu component. See https://material-ui.com/api/menu/ | {} |
License
Uses the MIT License