-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/info message component #644
Conversation
Hello jeanmarcmilletscality,My role is to assist you with the merge of this Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
describe('useComputeBackgroundColor', () => { | ||
it('should return backgroundlevel2 by default', () => { | ||
//S | ||
const SUT = jest.fn(); |
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.
could be declared once and be more explicit
import { useComputeBackgroundColor } from './InfoMessageUtils'; | ||
|
||
type Props = { | ||
title: string; |
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.
i would make it possible to provide a ReactNode or a string here. It would allow use cases where we want to add icons or actions button towards the end of the title line.
title: string; | |
title: string | ReactNode; |
color={defaultTheme.darkRebrand.infoPrimary} | ||
size="lg" | ||
/> | ||
<Text isEmphazed>{title}</Text> |
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.
I would check the typeOf title if it is a string then I would render it within the Text isEmphazed component, If it is a react node (else) I would render it directly
ref={containerRef} | ||
style={{ backgroundColor: backgroundColor }} | ||
> | ||
<TitleContainer> |
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.
This component can likely be replaced by a Stack
const SUT = jest.fn(); | ||
|
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.
As it is extracted you will need to add:
afterEach(() => {
SUT.mockClear()
})
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.
LGTM
/approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
Please check the status of the associated issue None. Goodbye jeanmarcmilletscality. |
Component:
InfoMessage
Description:
Design:
Breaking Changes:
Closes: #ISSUE_NUMBER