-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Helm charts values schema badge (#3772)
Signed-off-by: Cintia Sanchez Garcia <[email protected]>
- Loading branch information
1 parent
f83b553
commit 06c668d
Showing
14 changed files
with
413 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
157 changes: 157 additions & 0 deletions
157
web/src/layout/common/__snapshots__/PackageCard.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { isNull, isUndefined } from 'lodash'; | ||
import { CgListTree } from 'react-icons/cg'; | ||
|
||
import Badge from './Badge'; | ||
|
||
interface Props { | ||
hasValuesSchema: boolean; | ||
className?: string; | ||
dropdownAlignment?: 'start' | 'end'; | ||
noDropdown?: boolean; | ||
smallSize?: boolean; | ||
} | ||
|
||
const ValuesSchemaBadge = (props: Props) => { | ||
const hasValuesSchema = | ||
!isNull(props.hasValuesSchema) && !isUndefined(props.hasValuesSchema) && props.hasValuesSchema; | ||
|
||
return ( | ||
<Badge | ||
title="Values Schema" | ||
bgColor="#FCA311" | ||
icon={<CgListTree />} | ||
active={hasValuesSchema} | ||
className={props.className} | ||
dropdownAlignment={props.dropdownAlignment} | ||
noDropdown={props.noDropdown} | ||
smallSize={props.smallSize} | ||
popoverContent={ | ||
<> | ||
<div className="fs-6 fw-semibold border-bottom border-1 mb-3 pb-1">Values schema</div> | ||
|
||
<p> | ||
This chart {hasValuesSchema ? 'provides' : 'does not provide'} a{' '} | ||
<span className="fw-bold">values schema</span>. | ||
</p> | ||
</> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export default ValuesSchemaBadge; |
157 changes: 157 additions & 0 deletions
157
web/src/layout/package/__snapshots__/index.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.