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

Remove SpaceProps from ButtonProps #1309

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

mcklien
Copy link
Contributor

@mcklien mcklien commented Nov 19, 2024

Background

One primary reason is that styles defined via SpaceProps were not being applied to the Button component, leading to confusion and unexpected behavior for developers using the component.

Solution

The Button component has been updated to remove SpaceProps from its ButtonProps interface. This change eliminates direct support for spacing-related properties (e.g., margin, padding).

UU checks

  • It is possible to use the keyboard to reach your changes
  • It is possible to enlarge the text 400% without losing functionality
  • It works on both mobile and desktop
  • It works in both Chrome, Safari and Firefox
  • It works with VoiceOver
  • There are no errors in aXe / SiteImprove-plugins / Wave

If no packages, only docs has been changed:

  • Documentation version has been bumped (package.json in docs)

Everything about making a React component:
https://spor.vy.no/guides/how-to-make-new-react-components

HOW TO MAKE A CHANGESET:
Go here: https://spor.vy.no/guides/how-to-make-new-react-components#creating-a-pr-and-publish-package

How to test

try to add margin or padding on Button component. Make sure space props does not appear and is not supported.

@mcklien mcklien requested review from ithen15 and a team as code owners November 19, 2024 08:57
Copy link

changeset-bot bot commented Nov 19, 2024

🦋 Changeset detected

Latest commit: 137bc96

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vygruppen/spor-react Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@alicemacl alicemacl left a comment

Choose a reason for hiding this comment

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

Fint! Merge denne så den kommer i køen for release

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.

2 participants