File tree Expand file tree Collapse file tree 4 files changed +52
-4
lines changed
src/components/BentoGrid/ComponentCard Expand file tree Collapse file tree 4 files changed +52
-4
lines changed Original file line number Diff line number Diff line change 425425 "inactive" : " Coming soon..." ,
426426 "activate" : " Activate"
427427 },
428+ "KyvernoHint" : {
429+ "title" : " Kyverno" ,
430+ "subtitle" : " Enforce policies" ,
431+ "activeStatus" : " Active v" ,
432+ "progressAvailable" : " Available" ,
433+ "noResources" : " No Resources" ,
434+ "inactive" : " Inactive" ,
435+ "activate" : " Activate"
436+ },
428437 "common" : {
429438 "loading" : " Loading..." ,
430439 "errorLoadingResources" : " Error loading resources" ,
Original file line number Diff line number Diff line change 5656 padding : 0 0.5rem ;
5757}
5858
59+ .progressBarContainerSmall {
60+ display : flex;
61+ gap : 8px ;
62+ width : 100% ;
63+ max-width : 400px ;
64+ padding : 0 0.5rem ;
65+ }
66+
67+ .progressBarContainerMedium {
68+ display : flex;
69+ gap : 8px ;
70+ width : 100% ;
71+ max-width : 600px ;
72+ padding : 0 0.75rem ;
73+ }
74+
75+ .progressBarContainerLarge {
76+ display : flex;
77+ gap : 8px ;
78+ width : 100% ;
79+ max-width : none;
80+ padding : 0 1rem ;
81+ }
82+
5983.progressBar {
6084 width : 100% ;
6185}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export const ComponentCard: React.FC<GenericHintProps & { onClick?: () => void;
3838 />
3939 }
4040 titleText = { config . title }
41- subtitleText = { config . subtitle }
41+ subtitleText = { size === 'small' ? undefined : config . subtitle }
4242 interactive = { enabled }
4343 />
4444 }
@@ -65,14 +65,29 @@ export const ComponentCard: React.FC<GenericHintProps & { onClick?: () => void;
6565 ) }
6666
6767 < div className = { styles . contentContainer } >
68- < div className = { styles . progressBarContainer } >
68+ < div className = {
69+ size === 'small' ? styles . progressBarContainerSmall :
70+ size === 'medium' ? styles . progressBarContainerMedium :
71+ styles . progressBarContainerLarge
72+ } >
6973 < MultiPercentageBar
7074 segments = { hintState . segments }
7175 className = { styles . progressBar }
7276 label = { hintState . label }
7377 showPercentage = { hintState . showPercentage }
7478 isHealthy = { hintState . isHealthy }
7579 showOnlyNonZero = { hintState . showOnlyNonZero ?? true }
80+ barWidth = {
81+ size === 'small' ? '80%' :
82+ size === 'medium' ? '85%' :
83+ '90%'
84+ }
85+ barHeight = { size === 'small' ? '8px' : '12px' }
86+ barMaxWidth = {
87+ size === 'small' ? '400px' :
88+ size === 'medium' ? '600px' :
89+ 'none'
90+ }
7691 />
7792 </ div >
7893 </ div >
Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ export const useKyvernoHintConfig = (): GenericHintConfig => {
5656 const { t } = useTranslation ( ) ;
5757
5858 return {
59- title : "Kyverno" ,
60- subtitle : "Enfore policies" ,
59+ title : t ( 'Hints.KyvernoHint.title' ) ,
60+ subtitle : t ( 'Hints.KyvernoHint.subtitle' ) ,
6161 iconSrc : '/kyverno.svg' ,
6262 iconAlt : 'Kyverno' ,
6363 iconStyle : { borderRadius : '0' } , // Vault icon should not be rounded
You can’t perform that action at this time.
0 commit comments