mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
feat(onboarding): improve styles (#8323)
Adjust spacing between elements.
This commit is contained in:
parent
aa28b78c30
commit
3ac2c17a8e
@ -31,7 +31,7 @@ const Container = styled('div')(({ theme }) => ({
|
||||
}));
|
||||
|
||||
const TitleBox = styled('div')(({ theme }) => ({
|
||||
padding: theme.spacing(2, 7, 2, 7),
|
||||
padding: theme.spacing(2, 2.5, 2, 5),
|
||||
borderBottom: '1px solid',
|
||||
borderColor: theme.palette.divider,
|
||||
minHeight: '80px',
|
||||
@ -40,11 +40,16 @@ const TitleBox = styled('div')(({ theme }) => ({
|
||||
const Actions = styled('div')(({ theme }) => ({
|
||||
display: 'flex',
|
||||
flexGrow: 1,
|
||||
gap: theme.spacing(7),
|
||||
padding: theme.spacing(3, 5),
|
||||
[theme.breakpoints.down('md')]: {
|
||||
flexDirection: 'column',
|
||||
gap: theme.spacing(7),
|
||||
},
|
||||
}));
|
||||
|
||||
const ActionBox = styled('div')(({ theme }) => ({
|
||||
flexBasis: '50%',
|
||||
padding: theme.spacing(3, 2, 6, 8),
|
||||
display: 'flex',
|
||||
gap: theme.spacing(3),
|
||||
flexDirection: 'column',
|
||||
@ -114,7 +119,7 @@ export const ProjectOnboarding = ({
|
||||
};
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<Container data-testid='container'>
|
||||
<TitleBox>
|
||||
<TitleRow>
|
||||
<Typography fontWeight='bold'>
|
||||
|
@ -1,4 +1,10 @@
|
||||
import { type SelectChangeEvent, styled, Typography } from '@mui/material';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
type SelectChangeEvent,
|
||||
styled,
|
||||
Typography,
|
||||
} from '@mui/material';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useLocalStorageState } from 'hooks/useLocalStorageState';
|
||||
import Select from 'component/common/select';
|
||||
@ -13,11 +19,17 @@ const TitleContainer = styled('div')(({ theme }) => ({
|
||||
fontWeight: 'bold',
|
||||
}));
|
||||
|
||||
const StyledLink = styled(Link)({
|
||||
const StyledButton = styled(Button<typeof Link>)({
|
||||
fontWeight: 'bold',
|
||||
textDecoration: 'none',
|
||||
});
|
||||
|
||||
const SelectWithButton = styled(Box)(({ theme }) => ({
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: theme.spacing(1),
|
||||
}));
|
||||
|
||||
const repositoryUrl =
|
||||
'https://github.com/Unleash/unleash-sdk-examples/tree/main';
|
||||
|
||||
@ -56,21 +68,31 @@ export const SdkExample = () => {
|
||||
<>
|
||||
<TitleContainer>View SDK Example</TitleContainer>
|
||||
<Typography>
|
||||
Choose your preferred SDK to view an example
|
||||
Choose your preferred SDK to view an example.
|
||||
</Typography>
|
||||
<Select
|
||||
id='sdk-select'
|
||||
name='sdk'
|
||||
options={sdkOptions}
|
||||
value={selectedSdk}
|
||||
onChange={onChange}
|
||||
style={{
|
||||
width: '60%',
|
||||
}}
|
||||
/>
|
||||
<StyledLink to={`${repositoryUrl}/${selectedSdk}`} target='_blank'>
|
||||
Go to example
|
||||
</StyledLink>
|
||||
<SelectWithButton>
|
||||
<Select
|
||||
id='sdk-select'
|
||||
name='sdk'
|
||||
options={sdkOptions}
|
||||
value={selectedSdk}
|
||||
onChange={onChange}
|
||||
style={{
|
||||
width: '60%',
|
||||
}}
|
||||
/>
|
||||
<Box>
|
||||
<StyledButton
|
||||
to={`${repositoryUrl}/${selectedSdk}`}
|
||||
target='_blank'
|
||||
component={Link}
|
||||
variant='text'
|
||||
color='primary'
|
||||
>
|
||||
Go to example
|
||||
</StyledButton>
|
||||
</Box>
|
||||
</SelectWithButton>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user