extension icon indicating copy to clipboard operation
extension copied to clipboard

Design System - Button and Link Wrapper

Open pete-watters opened this issue 1 year ago • 4 comments

We need to improve LeatherButton / add a new wrapper that we can use to replace styled.button

It can enforce type=button so we don't need to keep repeating it

pete-watters avatar Nov 15 '23 14:11 pete-watters

@fbwoolf already added default type=button. Is this task to remove all instances of styled.button?

kyranjamie avatar Nov 15 '23 15:11 kyranjamie

Yes we were going to replace styled.button with a wrapper as sometimes we have added it in our big refactor

pete-watters avatar Nov 15 '23 16:11 pete-watters

Sometimes we are needing to use styled.button outside of the recipes, so this would be nice to have to prevent submit behavior. Not sure if we could just add to the current LeatherButton recipe and replace the use of styled.button in those cases? Sometimes it is being used to click on a row which was previously an as="button" situation.

fbwoolf avatar Nov 15 '23 18:11 fbwoolf

I'm not sure of the urgency of this but we can assess. Now we have the new Button and Link components the codebase is cleaner and more consistent.

We can assess if it's work refactoring styled tags to use these components only:

  • styled.button
  • styled.a

It could be a good idea if we then want to add visual tests to storybook but I don't think it's an urgent task

pete-watters avatar Jan 19 '24 05:01 pete-watters

Closing this off as I don't think it's necessary to do

pete-watters avatar Feb 29 '24 06:02 pete-watters