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 UsaButton component #14

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

Implement UsaButton component #14

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

Comments

@patrickcate
Copy link
Owner

UsaButton

A button draws attention to important actions with a large selectable surface.

status: draft

Props

Name Type Default Required Options
variant String '' false 'primary','secondary', 'accent-cool', 'accent-warm', 'base', 'outline', 'inverse', 'unstyled'
size String '' false 'big'

Slots

  • default

CSS Classes

  • size: usa-button--big
  • variant: usa-button--{{ variant }}

External Libraries

  • None

Sub-Components

  • None

Dependencies

  • BaseButton

Notes

  • If you want to style a link as a button, use the button CSS classes on a BaseLink component.
  • All BaseButton props can be used on this component.

Tests

  1. If the size prop is set to 'big', the CSS class 'usa-button--big' is applied.
  2. The correct CSS class is applied for each preset variant.
  3. If a custom variant is used, a kebab-case CSS class will be generated using the format: usa-button--{{ custom_variant }}.
  4. The slot content correctly renders.
@patrickcate patrickcate added the feature New feature or request label Nov 11, 2021
@patrickcate patrickcate self-assigned this Nov 23, 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