Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement UsaSummaryBox component #72

Closed
patrickcate opened this issue Oct 30, 2021 · 0 comments
Closed

Implement UsaSummaryBox component #72

patrickcate opened this issue Oct 30, 2021 · 0 comments
Assignees
Labels
feature New feature or request

Comments

@patrickcate
Copy link
Owner

Summary Box

A summary box highlights key information from a longer page or displays next steps.

status: draft

Props

Name Type Default Required Options
id String auto-generated false n/a
heading String '' false n/a
heading-tag String h2 false h1, h2, h3, h4, h5, h6

Slots

  • default
  • heading

External Libraries

  • None

Sub-Components

  • None

Dependencies

  • BaseHeading component

Notes

  • Any links in the default slot will need to have the CSS class usa-summary-box__link applied.

Tests

  1. The component has all of the default classes applied.
  2. If a id prop is not provided, a unique id is auto-generated.
  3. The aria-labelledby attribute is assigned the correct id prop value.
  4. When the heading prop is used, the text is added as the alert heading.
  5. When the heading slot is used, the content is added as the alert heading.
  6. When the heading prop and slot are both used, the heading slot will override the heading prop.
  7. Either the heading prop or slot must be used.
@patrickcate patrickcate self-assigned this Nov 11, 2021
@patrickcate patrickcate added the feature New feature or request label Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant