Closed HriBB closed 7 years ago
I don't mind adding it for consistency, but in theory, because Badge only clones the child, you can pass the onClick on the child directly
Diff Coverage | File Path |
---|---|
•••••••••• 100% | src/Badge/index.js |
Powered by Codecov. Last update 768b3f4...67cde10
It's because react-portal
adds a click handler dynamically on target prop.
<Menu target={<Badge text="2" overlap><IconButton name={'person'}/></Badge>} align={'tr tr'}>
<MenuItem/>
<MenuItem/>
<MenuItem/>
</Menu>
Adds the ability to pass extra props such as
onClick
handler onBadge
component. @tleunen please let me know if this makes sense.