Skip to content

Commit

Permalink
Merge pull request #11380 from pmakode-akamai/M3-8972-fix-overflow-is…
Browse files Browse the repository at this point in the history
…sue-on-kubernetes-summary-for-smaller-screens

fix: [M3-8972] - Overflow issue in Kubernetes Summary section on smaller screens (→ `staging`)
  • Loading branch information
jaalah-akamai authored Dec 10, 2024
2 parents 99c2d6c + 0a8cd3e commit 500475c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,23 @@ const useStyles = makeStyles()((theme: Theme) => ({
pointerEvents: 'none',
},
kubeconfigElement: {
'&:first-child': {
borderLeft: 'none',
},
'&:hover': {
opacity: 0.7,
},
'&:last-child': {
borderRight: 'none',
},
alignItems: 'center',
borderRight: '1px solid #c4c4c4',
borderLeft: '1px solid #c4c4c4',
cursor: 'pointer',
display: 'flex',
},
kubeconfigElements: {
alignItems: 'center',
color: theme.palette.primary.main,
display: 'flex',
flexWrap: 'wrap',
gap: theme.spacing(1),
},
kubeconfigFileText: {
color: theme.textColors.linkActiveLight,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Box, Chip, Stack, StyledActionButton, Typography } from '@linode/ui';
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
import { useTheme } from '@mui/material/styles';
import { useSnackbar } from 'notistack';
import * as React from 'react';

Expand Down Expand Up @@ -39,8 +38,6 @@ export const KubeSummaryPanel = React.memo((props: Props) => {
const { data: account } = useAccount();
const { showControlPlaneACL } = getKubeControlPlaneACL(account);

const theme = useTheme();

const { enqueueSnackbar } = useSnackbar();

const [drawerOpen, setDrawerOpen] = React.useState<boolean>(false);
Expand Down Expand Up @@ -95,7 +92,17 @@ export const KubeSummaryPanel = React.memo((props: Props) => {
<Box>
<EntityDetail
body={
<Stack direction="row" flexWrap="wrap" gap={2} px={3} py={2}>
<Stack
sx={(theme) => ({
padding: theme.spacing(2),
[theme.breakpoints.down('sm')]: {
padding: theme.spacing(1),
},
})}
direction="row"
flexWrap="wrap"
gap={2}
>
<KubeClusterSpecs cluster={cluster} />
<KubeConfigDisplay
clusterId={cluster.id}
Expand Down Expand Up @@ -135,12 +142,15 @@ export const KubeSummaryPanel = React.memo((props: Props) => {
header={
<EntityHeader>
<Box
sx={{
sx={(theme) => ({
paddingBottom: theme.spacing(),
paddingLeft: theme.spacing(3),
paddingRight: theme.spacing(1),
paddingTop: theme.spacing(),
}}
[theme.breakpoints.down('sm')]: {
paddingLeft: theme.spacing(2),
},
})}
>
<Typography variant="h2">Summary</Typography>
</Box>
Expand Down

0 comments on commit 500475c

Please sign in to comment.