FIX #673 - CardFooter component#700
Conversation
|
Hi @luco5826 , thanks for your first contribution! I'm reviewing this PR but I'm a bit concerned with the renaming bit. I guess the original issue wasn't clear enough, so I'm sorry for that. |
|
Hi @dej611 ! You're completely right, I didn't think about the renaming being a breaking change and in fact I was a bit worried about that. I'm going to fix it asap and since we're here, do you think it is better to create a CardFooter component as I implemented it (as a simple [EDIT]: I fixed those things you mentioned and I squashed all my commits into a single meaningful one, let me know if that is ok or I should rework it in another way! |
dej611
left a comment
There was a problem hiding this comment.
Left a note.
Everything else is ok, but I need that change to approve it 👍
src/components/Card/CardFooterCTA.js
Outdated
| className: PropTypes.string, | ||
| children: PropTypes.node | ||
| } | ||
|
|
||
| const CardFooterCTA = props => { | ||
| const { className, ...attributes } = props | ||
| const { className, children } = props | ||
| const classes = classNames(className, 'it-card-footer') | ||
| return <div className={classes} {...attributes} /> | ||
| return <div className={classes}>{children}</div> |
There was a problem hiding this comment.
Can you restore it with the old version?
The problem with the new one is that you are only letting the children props pass. Say the developer wants to add an aria-something on the div, how can he does that?
attributes contains children and also many HTML attributes in it.
|
@dej611 Hi! |
|
Yes. True. |
Fixes #673
PR Checklist
masterbranch.Short description of what this resolves:
The new CardFooter component is a wrapper for the class
it-card-footerprovided by BI.Changes proposed in this pull request: