1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-04 11:17:02 +02:00
unleash.unleash/frontend/src/component/integrations/IntegrationForm/IntegrationForm.styles.tsx
Nuno Góis 4167a60588
feat: biome lint frontend (#4903)
Follows up on https://github.com/Unleash/unleash/pull/4853 to add Biome
to the frontend as well.


![image](https://github.com/Unleash/unleash/assets/14320932/1906faf1-fc29-4172-a4d4-b2716d72cd65)

Added a few `biome-ignore` to speed up the process but we may want to
check and fix them in the future.
2023-10-02 13:25:46 +01:00

93 lines
2.4 KiB
TypeScript

import { Paper, styled } from '@mui/material';
import { TextField, Typography } from '@mui/material';
import { forwardRef, type FC, type ReactNode, ComponentProps } from 'react';
export const StyledForm = styled('form')(({ theme }) => ({
display: 'flex',
flexDirection: 'column',
height: '100%',
gap: theme.spacing(2),
marginTop: theme.spacing(1),
}));
export const StyledAlerts = styled('section')(({ theme }) => ({
display: 'flex',
flexDirection: 'column',
gap: theme.spacing(2),
}));
export const StyledHelpText = styled('p')(({ theme }) => ({
marginBottom: theme.spacing(1),
color: theme.palette.text.secondary,
fontSize: theme.typography.body2.fontSize,
}));
export const StyledContainer = styled('div')(({ theme }) => ({
display: 'flex',
flexDirection: 'column',
gap: theme.spacing(4),
}));
export const StyledButtonContainer = styled('div')({
display: 'flex',
justifyContent: 'flex-end',
});
export const StyledButtonSection = styled('section')(({ theme }) => ({
display: 'flex',
justifyContent: 'flex-end',
gap: theme.spacing(2),
}));
export const StyledTextField = styled(TextField)(({ theme }) => ({
width: '100%',
}));
export const StyledTitle = forwardRef<
HTMLHeadingElement,
{ children: ReactNode }
>(({ children }, ref) => (
<Typography
ref={ref}
component='h4'
variant='h4'
sx={(theme) => ({
margin: theme.spacing(1, 0),
})}
>
{children}
</Typography>
));
export const StyledAddonParameterContainer = styled('div')({
marginTop: '25px',
});
export const StyledConfigurationSection = styled('section')(({ theme }) => ({
borderWidth: '1px',
borderStyle: 'solid',
borderColor: theme.palette.neutral.border,
borderRadius: `${theme.shape.borderRadiusLarge}px`,
padding: theme.spacing(3),
display: 'flex',
flexDirection: 'column',
gap: theme.spacing(3),
}));
export const StyledRaisedSection: FC<ComponentProps<typeof Paper>> = ({
...props
}) => (
<Paper
elevation={0}
sx={(theme) => ({
background: theme.palette.background.elevation1,
padding: theme.spacing(2, 3),
display: 'flex',
flexDirection: 'column',
width: '100%',
borderRadius: `${theme.shape.borderRadiusLarge}px`,
})}
{...props}
/>
);