Split Button
Split button is used to group related actions, allowing users to perform a main action or choose from a menu of secondary actions.
import { SplitButton } from '@balance-web/split-button';SplitButton
colorScheme, variant, size, disabled, loading
These props are the same as the - Button
button
Used to provide the main action.
It supports all the props a Button does except for colorScheme, variant, size, disabled, loading which are applied to the component as a whole based on the previous section and iconAfter.
menuItems
Used to provide the secondary actions in the form of a menu. It's supposed to be a ReactNode which returns a list of Dropdown.Item. You can use all the props supported by Dropdown.Item such as disabled and href.
You can also use other elements from the dropdown-v2 package such as Dropdown.GroupTitle and Dropdown.Divider.
NOTE: An error will be thrown if there are no
menuItemsprovided. Use aButtoninstead if there are no menu items to be rendered.