Skip to content

Add ActionList.GroupHeading.LeadingVisual #7968

@mattobee

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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions