Module Solidtype_heroui.Button_group

HeroUI's ButtonGroup: a <div role="group"> of Buttons, with HeroUI's classes from Styles.ButtonGroup, which round the first and the last and none between. It gives the buttons inside it its variant, size, is_disabled and full_width, each where the button sets none itself. A Separator inside a button, but the first, draws a line before it.

  <Button_group variant=`tertiary>
    <Button>"Copy"</Button>
    <Button><Button_group.Separator /> "Paste"</Button>
  </Button_group>

Kobalte has no group, and a group has no behaviour: it is an element and the context its buttons read. Every button inside it reads that context, not only its own children as in React, until a component that holds buttons of its own -- a dialog, a dropdown -- gives them a context of their own.

type group = {
  1. variant : unit -> [ `primary | `secondary | `tertiary | `outline | `ghost | `danger | `danger_soft ] option;
  2. size : unit -> [ `sm | `md | `lg ] option;
  3. is_disabled : unit -> bool option;
  4. full_width : unit -> bool option;
}

What a group gives its buttons: each prop it was given, or None.

module Context : sig ... end
module Separator : sig ... end

The line before a button in a group, which HeroUI's styles draw at its start edge.

module Props : sig ... end