Skip to content

Commit 192f004

Browse files
committed
fix: styling color
Signed-off-by: Amit Amrutiya <[email protected]>
1 parent f5daa76 commit 192f004

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

src/custom/ResourceDetailFormatters/Formatter.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ export const LabelFormatter: React.FC<LabelFormatterProps> = ({
324324
size="small"
325325
onClickCapture={() => handleClick(item)}
326326
clickable={onClick !== undefined && true}
327+
style={{
328+
backgroundColor: selectedLabels.includes(item) ? KEPPEL : undefined
329+
}}
327330
/>
328331
</ElementData>
329332
);
@@ -580,7 +583,7 @@ export const ContainerFormatter: React.FC<ContainerFormatterProps> = ({
580583
const stateValues = Object.values(containerStatus.state)[0];
581584
const startedAt = stateValues ? stateValues?.startedAt : null;
582585
return (
583-
<Box display="flex" flexDirection="column">
586+
<Box display="flex" flexDirection="column" gap={'0.5rem'}>
584587
<KeyValueInRow
585588
Key={'Status'}
586589
Value={<StatusFormatter status={status} rightPosition="1rem" />}

src/custom/ResourceDetailFormatters/styles.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { alpha, Theme } from '@mui/material';
22
import { Box, Chip, Grid, IconButton, Typography } from '../../base';
3-
import { charcoal, KEPPEL, styled, TRANSPARENT_WHITE } from '../../theme';
3+
import { charcoal, KEPPEL, styled } from '../../theme';
44

55
interface StyledProps {
66
noPadding?: boolean;
@@ -154,17 +154,17 @@ export const CollapsibleSectionContent = styled(Box)({
154154
});
155155

156156
export const StyledEnvironmentVariablesCode = styled('code')(({ theme }) => ({
157-
backgroundColor: theme.palette.mode === 'light' ? TRANSPARENT_WHITE : '#253137',
158-
color: 'white',
157+
backgroundColor: theme.palette.mode === 'light' ? '#e9eff1' : '#253137',
158+
color: theme.palette.text.primary,
159159
width: '100%',
160160
display: 'flex',
161161
flexDirection: 'column',
162162
gap: '0.5rem'
163163
}));
164164

165165
export const StyledEnvironmentVariablesPre = styled('pre')(({ theme }) => ({
166-
backgroundColor: theme.palette.mode === 'light' ? TRANSPARENT_WHITE : '#253137',
167-
color: 'white',
166+
backgroundColor: theme.palette.mode === 'light' ? '#e9eff1' : '#253137',
167+
color: theme.palette.text.primary,
168168
padding: '0.5rem',
169169
margin: '0',
170170
width: '100%'
@@ -182,8 +182,8 @@ export const EnvironmentVariableValue = styled('span')({
182182
});
183183

184184
export const CodeFormatterPre = styled('pre')(({ theme }) => ({
185-
backgroundColor: theme.palette.mode === 'light' ? TRANSPARENT_WHITE : '#212121',
186-
color: 'white',
185+
backgroundColor: theme.palette.mode === 'light' ? '#e9eff1' : '#212121',
186+
color: theme.palette.text.primary,
187187
width: '100%',
188188
wordWrap: 'break-word',
189189
overflowWrap: 'break-word',
@@ -193,8 +193,8 @@ export const CodeFormatterPre = styled('pre')(({ theme }) => ({
193193
}));
194194

195195
export const CodeFormatterCode = styled('code')(({ theme }) => ({
196-
backgroundColor: theme.palette.mode === 'light' ? TRANSPARENT_WHITE : '#212121',
197-
color: 'white',
196+
backgroundColor: theme.palette.mode === 'light' ? '#e9eff1' : '#212121',
197+
color: theme.palette.text.primary,
198198
fontFamily: theme.typography.fontFamily
199199
}));
200200

@@ -290,7 +290,7 @@ export const OperatorDataContainer = styled('div')({
290290

291291
export const KeyValueGrid = styled(Grid)(({ theme }) => ({
292292
borderBottom: `1px solid ${theme.palette.divider}`,
293-
paddingBlock: '0.3rem'
293+
paddingBlock: '0.5rem'
294294
}));
295295

296296
export const KeyValueGridTitle = styled(Typography)({

src/custom/ResourceDetailFormatters/useResourceCleanData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const useResourceCleanData = () => {
6666
resource,
6767
activeLabels,
6868
dispatchMsgToEditor,
69-
showStatus
69+
showStatus = true
7070
}: GetResourceCleanDataProps) => {
7171
const parsedStatus = resource?.status?.attribute && JSON.parse(resource?.status?.attribute);
7272
const parsedSpec = resource?.spec?.attribute && JSON.parse(resource?.spec.attribute);

0 commit comments

Comments
 (0)