Skip to content

Add ActionList.GroupHeading.LeadingVisual #7968

Description

@mattobee

Add support for a leading visual on ActionList.Group headings, via a new ActionList.GroupHeading.LeadingVisual component. This mirrors the existing ActionList.GroupHeading.TrailingAction (added in #7829, closing #2043) so the API is consistent on both sides of a group heading.

<ActionList>
  <ActionList.Group>
    <ActionList.GroupHeading as="h3">
      <ActionList.GroupHeading.LeadingVisual>
        <FileDirectoryIcon />
      </ActionList.GroupHeading.LeadingVisual>
      Custom fields
    </ActionList.GroupHeading>
    <ActionList.Item></ActionList.Item>
  </ActionList.Group>
</ActionList>

Needed for the collapsed nav group popover in github/github-ui#22642, where a group heading needs a leading icon.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions