-
Notifications
You must be signed in to change notification settings - Fork 55
feat(chat): add avatar prop to chat message subcomponent #159
Conversation
Codecov Report
@@ Coverage Diff @@
## master #159 +/- ##
==========================================
- Coverage 68.02% 67.87% -0.16%
==========================================
Files 101 101
Lines 1370 1385 +15
Branches 269 274 +5
==========================================
+ Hits 932 940 +8
- Misses 436 442 +6
- Partials 2 3 +1
Continue to review full report at Codecov.
|
61de3cb
to
94ca849
Compare
marginTop: '1rem', | ||
marginBottom: '1rem', | ||
...(props.mine | ||
...(p.mine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Levi always prefers destructuring objects at the beginning of a function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well it was not destructured before and doing so will increase code size; Levi prefers shorter code as well; I think destructuring should happen once we use more props there or logic becomes more complex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the important thing that blocks PR from being merged is necessity to use shorthand factory for creating child Avatar component. As an example of that, please, consider how icon
property is introduced for Input
component
72624f7
to
043ed7d
Compare
@kuzhelov , @miroslavstastny - thanks for reviewing, addressed all comments |
1d946b8
to
3c1fc7b
Compare
3c1fc7b
to
4cdecc7
Compare
0344df3
to
83d0977
Compare
Chat
This PR add the
avatar
prop to the Chat.Message subcomponent. This provides the ability to add an avatar next to a chat message and specify the whole spectrum of properties an avatar can have.TODO
API Proposal
avatar
avatar
is a shorthand for the Avatar component; it can be:generates: