Pass props into native elements
Closed this issue · 3 comments
nowyDEV commented
Some components take only a few props that are required for logic inside their code, they should spread all of the remaining props that was passed into them to the native html element, you should also remove redundant native attributes/event handlers from props type interface and extend it with the one provided by React.
You can see how it should be done inside
src/components/checkbox/Checkbox.tsx
src/components/switch/Switch.tsx
Components to refactor:
- src/components/toggle
- src/components/text (fix types)
- src/components/svgicon (fix types)
- src/components/selectbutton (fix types)
- src/components/message/Message.tsx (fix types)
MykolaKolotylo commented
hey @nowyDEV can I try to do it?
MykolaKolotylo commented