-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat: accordion build item content #107
Conversation
6f84d3a
to
5c3fe08
Compare
const AccordionBuildsTrigger = ({ | ||
accordionData, | ||
}: IAccordionItems): JSX.Element => { | ||
const triggerInfo = accordionData as AccordionItemBuilds; |
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.
Its a good pratice to avoid the use of as
when possible since it really force the type don't matter what. We could create another type or do:
const AccordionBuildsTrigger = ({
accordionData,
}: {
accordionData: AccordionItemBuilds;
}): JSX.Element => {
? [ | ||
{ | ||
value: contentData.testStatus?.passTests ?? 0, | ||
label: 'Test Success', |
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.
i18n on labels
color: Colors.Gray, | ||
}, | ||
] | ||
: [{ value: 1, label: 'None', color: Colors.Gray }]; |
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.
why value: 1
and label: 'None
?
138ec6f
to
650844c
Compare
<LinkWithIcon | ||
title={<FormattedMessage id="buildAccordion.kernelConfig" />} | ||
icon={<MdFolderOpen className="text-lightBlue" />} | ||
link={kernelConfig} | ||
linkText={<FormattedMessage id="buildAccordion.kernelConfigPath" />} | ||
/> |
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.
We could make LinksGroup
receive an array of objects containing title
, link
e linkText
. Thais way LinksGroup
becomes more general and reusable
@@ -40,7 +40,7 @@ const CardContent = ({ card }: ICardContent): JSX.Element => { | |||
/> | |||
); | |||
} else if (card.type === 'chart') { | |||
return <StatusChartMemoized {...card} />; | |||
return <StatusChartMemoized {...card} title={<></>} />; |
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.
it would be better to make the title optional
403ac75
to
72fe214
Compare
655d4ce
to
31908a6
Compare
31908a6
to
da4fc95
Compare
Description
Related Issues
Visual reference