Rich text / foldkit-mixins-richtext

blockStyleMenu

function · packages/mixins-richtext/src/style.ts:106

function blockStyleMenu<Message>(): SlotView.SlotView<
  typeof BlockStyleMenuSlots,
  BlockStyleMenuInput<Message>,
  Message
>

The same styles as blockStyles, in the space of one button: the trigger names the style the selection's block has ("Text style" where none applies, as in a code block) and opens a menu of every style, the current one checked. Choosing one sends its RetypedBlock through wrap, which is where a caller also closes the menu. The trigger is disabled without a text selection.