[Avatar] Should have a consistent root node element
Problem description
Avatar current renders a div at the root if it contains an icon/other content, or an img if it is passed an src.
For consistency, the img variation should also render a div for the root node. This also gives users the ability to implement consistent brand style tweaks such as borders, shadows, etc.
@see https://github.com/callemall/material-ui/pull/4409#issuecomment-223280610
Versions
- Material-UI: HEAD
- React: 15.1.0
- Browser: All
Is anyone working on this? I'd like to pick it up
I'm working on this but found an interesting line in the tests https://github.com/callemall/material-ui/blob/master/src/Avatar/Avatar.spec.js#L38
Is this ok? assert.notOk with ! in the param, so basically it's an assert.ok which is a falsy test!
I'm I missing something? cc @oliviertassinari @nathanmarks @mbrookes
@elazzabi contains returns a boolean, I would rather use assert.strictEqual. I don't think you miss anything. I believe it was done by mistake, double negation ☯️ .
@oliviertassinari yeah I was talking about the double negation. I'll correct it :v:
I'm not sure when that was fixed, but it's 😄 . We always use a div as root node.