LaunchPadLab / lp-components

Our Components
http://lp-components.herokuapp.com
MIT License
5 stars 1 forks source link

Added <Switch> component, tests, and storybook #433

Closed mwislek closed 3 years ago

mwislek commented 4 years ago

Resolves issue: https://github.com/LaunchPadLab/lp-components/issues/320 by adding a new <Switch> React component, based on https://react-switch.netlify.app.

Author Checklist

mwislek commented 4 years ago

@dpikt . Let me know if you'd like to walk through this in a meeting and I can set something up.

dpikt commented 4 years ago

@marchwiany what do you think about the default icons on this component? My instinct is to remove them but they might be necessary for a11y?

marchwiany commented 4 years ago

@dpikt yeah we should leave them since "color should not be used as the only visual means to convey information, indicate an action, or distinguish an element".

dpikt commented 3 years ago

@mwislek this is good to merge to master 👍

mwislek commented 3 years ago

Hi @dpikt . We're getting an interesting Travis error:

Package size limit has exceeded by 795 B
258  Size limit: 185 KB
259  Size:       185.78 KB with all dependencies, minified and gzipped
260  
261  Try to reduce size or increase limit at .size-limit.js

Looks like all of our hard work (code) has pushed us over our size limits. Do you have any idea who/what the culprit might be? yarn size merely returns the same message with no details on individual components. Looking at individual file sizes wasn't too revealing either.

Also, you'll need to approve the PR in order for me to merge. Thanks!

dpikt commented 3 years ago

Ah yeah, it's probably from adding react-switch. That should be fine (this library is modular anyway). That check is mostly to make sure we don't add anything huge by accident. You can bump the limit to 200kb to get it to pass 👍

mwislek commented 3 years ago

Thanks David! Finally merging!