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

Add Button component #63

Merged
merged 24 commits into from
Apr 26, 2023
Merged

Add Button component #63

merged 24 commits into from
Apr 26, 2023

Conversation

Benaiah
Copy link
Contributor

@Benaiah Benaiah commented Apr 22, 2023

Jira ticket: LDAF-176

Proposed changes

  • Adds a Button component with variants based on the LDAF design system.

Screenshots

image

Acceptance criteria validation

  • Tests added to cover the change

@vercel
Copy link

vercel bot commented Apr 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ldaf ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2023 9:20pm

Copy link
Member

@LouisFettet LouisFettet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing some weirdness in Storybook and I think we can improve testing a bit, but overall this is looking good!

src/stories/Button.stories.ts Outdated Show resolved Hide resolved
src/lib/components/Button/Button.scss Outdated Show resolved Hide resolved
src/lib/components/Button/Button.svelte Outdated Show resolved Hide resolved
src/lib/components/Button/__tests__/ButtonTest.svelte Outdated Show resolved Hide resolved
Benaiah added 4 commits April 26, 2023 13:38
- Remove extra specificity of custom styles that collides with USWDS
  classes
- Refactor how "unstyled" prop works to match how it works in the
  USWDS component library
- Make "usa-button--unstyled" class work properly again after custom
  button styling
- Add tests for each variant, both styled and unstyled
- Add two unstyled button Storybook stories
Copy link
Contributor

@hinzed1127 hinzed1127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Up to you how we handle order of operations on the scss variables

Comment on lines +3 to +18
$colors: (
"primary": #0051ad,
"primary-dark": #063c7a,
"primary-darker": #00284d,
"disabled": #c9c9c9,
"disabled-dark": #adadad,
"base-lightest": #f2f1f0,
"base-light": #a9aeb1,
"base-dark": #565c65,
"base-darker": #3d4551,
"gray-05": #f0f0f0,
"primary-lightest": #d1e9ff,
"text-only-hover": rgba(6, 60, 122, 16%),
"text-only-active": rgba(6, 60, 122, 30%),
"outline-inverse": #dcdee0,
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My site title PR defined the current color palette as global variables. That covers everything here except for the last 3 (and gray-05, although $grayscale-05 is extremely close if that's an acceptable substitution, cc @getpunched )

If we like that approach, I can make a smaller PR to just get that in or do follow-up on this once #50 gets in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A follow-up PR to add that would be great! I've added a TODO comment indicating that we should do that.

@Benaiah Benaiah merged commit b8c138c into main Apr 26, 2023
@Benaiah Benaiah deleted the benaiah/add-svelte-button-component branch April 26, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants