-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
391/v2 button styling #397
base: dev
Are you sure you want to change the base?
Conversation
Intended to act as the main button used on the site, controls styling and variations with props, and attempts to enforce consistency, reusability and accessibility
✅ Deploy Preview for cool-creponne-3e1272 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…and renames ligtMode to variant Relates #391
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Babes, marked it as a request changes because I think we should avoid all that styling in the component file and it's definitely a better practice to extend native prop types over emulating them ourselves.
But overall I think making this a component is overkill but you might have been thinking of enforcing accessibility practices maybe ( ? ) so let me know what you think.
Good, nice, comprehensive documentation - I appreciate it much ✨
…yle system in figma Relates #391
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
**Relates #390 & Closes #391 **
This pull request includes a new
MainButton
component and its associated stories, as well as a minor update to the global CSS file to improve accessibility. The most important changes are detailed below.MainButton Component:
MainButton
Component: Introduced a newMainButton
component with various props to handle different button states and styles, includingvariant
,size
,colour
,lightMode
,type
,disabled
, andclickHandler
. The component also includes default values and styles for each prop. (components/buttons/MainButton/MainButton.tsx
)Storybook Stories:
MainButton
: Added comprehensive Storybook stories for theMainButton
component, showcasing different button states such as default, large, small, mobile, secondary, tertiary, light mode, and disabled. Each story includes appropriate args and a play function to test button interactions. (components/buttons/MainButton/MainButton.stories.ts
)Global CSS:
outline-offset
for the:focus-visible
state to improve accessibility by making the focus outline more visible. (app/globals.css
)UI changes
Component with props to match the above styling.
Tests
Storybook tests and stories as outline above.