one-click-accessibility/modules/settings/assets/js/layouts/icon-design-settings.js
Nirbhay Singh c067ae8b4b
[APP-1051] Fix layout on the small and medium devices (#156)
* fix: layout on the small and medium devices

* update: change components to styled components

* refactor: position settings wrapper into a separate component
2025-02-06 11:20:07 +02:00

49 lines
1.2 KiB
JavaScript

import Box from '@elementor/ui/Box';
import Grid from '@elementor/ui/Grid';
import Typography from '@elementor/ui/Typography';
import { styled } from '@elementor/ui/styles';
import { ColorPicker, IconSelect, IconSize } from '@ea11y/components';
import { __ } from '@wordpress/i18n';
const StyledGrid = styled(Grid)`
display: grid;
gap: ${({ theme }) => theme.spacing(5)};
padding: ${({ theme }) => theme.spacing(2)};
grid-template-columns: repeat(2, 1fr);
${({ theme }) => theme.breakpoints.down('lg')} {
grid-template-columns: repeat(1, 1fr);
}
`;
const IconDesignSettings = (props) => {
return (
<Grid padding={2} border={1} borderColor="divider" {...props}>
<Box marginBottom={2}>
<Typography variant="subtitle1">
{__('Design', 'pojo-accessibility')}
</Typography>
<Typography variant="body2">
{__(
"Customize your accessibility button's color, icon, and size to match your brand.",
'pojo-accessibility',
)}
</Typography>
</Box>
<StyledGrid>
<Box display="flex" flexDirection="column" gap={5}>
<IconSelect />
<IconSize />
</Box>
<Box>
<ColorPicker />
</Box>
</StyledGrid>
</Grid>
);
};
export default IconDesignSettings;