1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-27 13:49:10 +02:00

rebase and add some old stuff back

This commit is contained in:
Thomas Heartman 2025-07-02 09:48:33 +02:00
parent bb473001c0
commit 87cec28e75
2 changed files with 37 additions and 3 deletions

View File

@ -1,7 +1,40 @@
import { styled, Typography } from '@mui/material'; import { styled, Typography } from '@mui/material';
import type { PropsWithChildren } from 'react';
export const ChangeItemInfo = styled(Typography)(({ theme }) => ({ const Action = styled(Typography)(({ theme }) => ({
whiteSpace: 'nowrap',
}));
export const Deleted = styled(Action)(({ theme }) => ({
color: theme.palette.error.main,
'::before': { content: '"- "' },
}));
export const Added = styled(Action)(({ theme }) => ({
'::before': { content: '"+ "' },
color: theme.palette.success.dark,
}));
export const AddedStrategy = styled(Added, {
shouldForwardProp: (prop) => prop !== 'disabled',
})<{ disabled?: boolean }>(({ theme, disabled }) => ({
color: disabled ? theme.palette.text.disabled : undefined,
}));
const Change = styled('span')({
fontWeight: 'bold',
});
export const ChangeItemInfo = styled(
({ children, ...props }: PropsWithChildren) => (
<Typography {...props}>
<Change>Change:</Change>
{children}
</Typography>
),
)(({ theme }) => ({
display: 'flex', display: 'flex',
justifyItems: 'flex-start',
flexFlow: 'row', flexFlow: 'row',
alignItems: 'center', alignItems: 'center',
flex: 'auto', flex: 'auto',

View File

@ -35,6 +35,7 @@ const ChangeItemCreateEditDeleteWrapper = styled(Box)(({ theme }) => ({
alignItems: 'center', alignItems: 'center',
marginBottom: theme.spacing(1), marginBottom: theme.spacing(1),
width: '100%', width: '100%',
flexFlow: 'row wrap',
})); }));
const StyledBox: FC<{ children?: React.ReactNode }> = styled(Box)( const StyledBox: FC<{ children?: React.ReactNode }> = styled(Box)(
@ -324,13 +325,13 @@ export const StrategyChange: FC<{
); );
const actionsWithTabs = ( const actionsWithTabs = (
<> <div>
<TabList> <TabList>
<Tab>Change</Tab> <Tab>Change</Tab>
<Tab>View diff</Tab> <Tab>View diff</Tab>
</TabList> </TabList>
{actions} {actions}
</> </div>
); );
return ( return (