UNPKG

@atlaskit/button

Version:

A button triggers an event or action. They let users know what will happen next.

12 lines 426 B
import { Children } from 'react'; export const getActions = children => { const [PrimaryAction, SecondaryAction] = Children.toArray(children); if (typeof process !== 'undefined' && process.env.NODE_ENV === 'development' && (!PrimaryAction || !SecondaryAction)) { // TODO: i18n? throw new SyntaxError('SplitButton requires two children to be provided'); } return { PrimaryAction, SecondaryAction }; };