mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-31 01:16:01 +02:00
adjusting mobile styles (#2604)
This commit is contained in:
parent
c4f3ada0eb
commit
95937a4538
@ -29,6 +29,9 @@ const StyledAsideBox = styled(Box)(({ theme }) => ({
|
|||||||
width: '30%',
|
width: '30%',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
|
[theme.breakpoints.down('sm')]: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledPaper = styled(Paper)(({ theme }) => ({
|
const StyledPaper = styled(Paper)(({ theme }) => ({
|
||||||
@ -37,6 +40,10 @@ const StyledPaper = styled(Paper)(({ theme }) => ({
|
|||||||
width: '70%',
|
width: '70%',
|
||||||
padding: theme.spacing(1, 2),
|
padding: theme.spacing(1, 2),
|
||||||
borderRadius: theme.shape.borderRadiusLarge,
|
borderRadius: theme.shape.borderRadiusLarge,
|
||||||
|
[theme.breakpoints.down('sm')]: {
|
||||||
|
marginLeft: 0,
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledButtonBox = styled(Box)(({ theme }) => ({
|
const StyledButtonBox = styled(Box)(({ theme }) => ({
|
||||||
@ -49,6 +56,13 @@ const StyledInnerContainer = styled(Box)(({ theme }) => ({
|
|||||||
padding: theme.spacing(2),
|
padding: theme.spacing(2),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const ChangeRequestBody = styled(Box)(({ theme }) => ({
|
||||||
|
display: 'flex',
|
||||||
|
[theme.breakpoints.down('sm')]: {
|
||||||
|
flexDirection: 'column',
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
export const ChangeRequestOverview: FC = () => {
|
export const ChangeRequestOverview: FC = () => {
|
||||||
const projectId = useRequiredPathParam('projectId');
|
const projectId = useRequiredPathParam('projectId');
|
||||||
const [showCancelDialog, setShowCancelDialog] = useState(false);
|
const [showCancelDialog, setShowCancelDialog] = useState(false);
|
||||||
@ -139,7 +153,7 @@ export const ChangeRequestOverview: FC = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ChangeRequestHeader changeRequest={changeRequest} />
|
<ChangeRequestHeader changeRequest={changeRequest} />
|
||||||
<Box sx={{ display: 'flex' }}>
|
<ChangeRequestBody>
|
||||||
<StyledAsideBox>
|
<StyledAsideBox>
|
||||||
<ChangeRequestTimeline state={changeRequest.state} />
|
<ChangeRequestTimeline state={changeRequest.state} />
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
@ -272,7 +286,7 @@ export const ChangeRequestOverview: FC = () => {
|
|||||||
can't be reopened.
|
can't be reopened.
|
||||||
</Typography>
|
</Typography>
|
||||||
</Dialogue>
|
</Dialogue>
|
||||||
</Box>
|
</ChangeRequestBody>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,7 @@ export const ChangeRequestTitleCell = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TextCell>
|
<TextCell sx={{ minWidth: '200px' }}>
|
||||||
<StyledLink>
|
<StyledLink>
|
||||||
<Link
|
<Link
|
||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
|
@ -4,6 +4,10 @@ export const useStyles = makeStyles()(theme => ({
|
|||||||
header: {
|
header: {
|
||||||
padding: theme.spacing(0, 4),
|
padding: theme.spacing(0, 4),
|
||||||
},
|
},
|
||||||
|
bodyClass: {
|
||||||
|
padding: theme.spacing(4),
|
||||||
|
overflowX: 'auto',
|
||||||
|
},
|
||||||
tabContainer: {
|
tabContainer: {
|
||||||
paddingLeft: 0,
|
paddingLeft: 0,
|
||||||
paddingBottom: 0,
|
paddingBottom: 0,
|
||||||
|
@ -211,6 +211,7 @@ export const ChangeRequestsTabs = ({
|
|||||||
return (
|
return (
|
||||||
<PageContent
|
<PageContent
|
||||||
isLoading={loading}
|
isLoading={loading}
|
||||||
|
bodyClass={classes.bodyClass}
|
||||||
headerClass={classes.header}
|
headerClass={classes.header}
|
||||||
header={
|
header={
|
||||||
<PageHeader
|
<PageHeader
|
||||||
@ -220,6 +221,8 @@ export const ChangeRequestsTabs = ({
|
|||||||
value={tabs[activeTab]?.title}
|
value={tabs[activeTab]?.title}
|
||||||
indicatorColor="primary"
|
indicatorColor="primary"
|
||||||
textColor="primary"
|
textColor="primary"
|
||||||
|
variant="scrollable"
|
||||||
|
allowScrollButtonsMobile
|
||||||
>
|
>
|
||||||
{tabs.map((tab, index) => (
|
{tabs.map((tab, index) => (
|
||||||
<Tab
|
<Tab
|
||||||
|
@ -21,6 +21,9 @@ export const useStyles = makeStyles()(theme => ({
|
|||||||
[theme.breakpoints.down('md')]: {
|
[theme.breakpoints.down('md')]: {
|
||||||
padding: theme.spacing(2),
|
padding: theme.spacing(2),
|
||||||
},
|
},
|
||||||
|
[theme.breakpoints.down('sm')]: {
|
||||||
|
overflowX: 'auto',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
paddingDisabled: {
|
paddingDisabled: {
|
||||||
padding: '0',
|
padding: '0',
|
||||||
|
@ -30,7 +30,13 @@ export const EnvironmentNameCell = ({
|
|||||||
const { searchQuery } = useSearchHighlightContext();
|
const { searchQuery } = useSearchHighlightContext();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TextCell>
|
<TextCell
|
||||||
|
sx={theme => ({
|
||||||
|
[theme.breakpoints.up('sm')]: {
|
||||||
|
minWidth: '350px',
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
>
|
||||||
<Highlighter search={searchQuery}>{environment.name}</Highlighter>
|
<Highlighter search={searchQuery}>{environment.name}</Highlighter>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={environment.protected}
|
condition={environment.protected}
|
||||||
|
@ -240,6 +240,7 @@ const Project = () => {
|
|||||||
value={activeTab?.path}
|
value={activeTab?.path}
|
||||||
indicatorColor="primary"
|
indicatorColor="primary"
|
||||||
textColor="primary"
|
textColor="primary"
|
||||||
|
variant="scrollable"
|
||||||
>
|
>
|
||||||
{tabs.map(tab => (
|
{tabs.map(tab => (
|
||||||
<Tab
|
<Tab
|
||||||
|
@ -153,7 +153,6 @@ const ProjectEnvironmentList = () => {
|
|||||||
Cell: ({ row: { original } }: any) => (
|
Cell: ({ row: { original } }: any) => (
|
||||||
<EnvironmentNameCell environment={original} />
|
<EnvironmentNameCell environment={original} />
|
||||||
),
|
),
|
||||||
minWidth: 350,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: 'Type',
|
Header: 'Type',
|
||||||
|
@ -109,7 +109,7 @@ exports[`renders an empty list correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="body css-54jt3w-bodyContainer"
|
className="body css-142eaq1-bodyContainer"
|
||||||
>
|
>
|
||||||
<table
|
<table
|
||||||
className="MuiTable-root css-1h6dscb-MuiTable-root-table"
|
className="MuiTable-root css-1h6dscb-MuiTable-root-table"
|
||||||
|
Loading…
Reference in New Issue
Block a user