import React from 'react';
import { MenuToggleCheckbox, MenuToggle } from '@breakaway/preact-core';

export const MenuToggleSplitButtonCheckbox: React.FunctionComponent = () => (
  <React.Fragment>
    <MenuToggle
      splitButtonOptions={{
        items: [<MenuToggleCheckbox id="split-button-checkbox-example" key="split-checkbox" aria-label="Select all" />]
      }}
      aria-label="Menu toggle with checkbox split button"
    />{' '}
    <MenuToggle
      variant="primary"
      splitButtonOptions={{
        items: [<MenuToggleCheckbox id="split-button-checkbox-example" key="split-checkbox" aria-label="Select all" />]
      }}
      aria-label="Menu toggle with checkbox split button"
    />{' '}
    <MenuToggle
      variant="secondary"
      splitButtonOptions={{
        items: [<MenuToggleCheckbox id="split-button-checkbox-example" key="split-checkbox" aria-label="Select all" />]
      }}
      aria-label="Menu toggle with checkbox split button"
    />
  </React.Fragment>
);
