one-click-accessibility/modules/settings/assets/js/layouts/widget-preview.js
Pavlo Kniazevych 35c89e71ec
Bug/app 1003 (#147)
* Fix: Add a border to the preview [n/a]

* Fix: Fix Capabilities screen UI [APP-1003]
2025-01-23 16:12:40 +02:00

51 lines
1.1 KiB
JavaScript

import Card from '@elementor/ui/Card';
import CardContent from '@elementor/ui/CardContent';
import CardHeader from '@elementor/ui/CardHeader';
import Typography from '@elementor/ui/Typography';
import { styled } from '@elementor/ui/styles';
import { WidgetLoader } from '@ea11y/components';
import { __ } from '@wordpress/i18n';
const StyledPreview = styled(CardContent)`
margin-right: auto;
margin-left: auto;
margin-top: ${({ theme }) => theme.spacing(4)};
padding: 0 24px;
overflow: auto;
& #ea11y-root {
position: absolute;
top: 0;
left: 0;
right: 0;
transform: scale(70%);
}
`;
const WidgetPreview = () => {
return (
<>
<Card variant="outlined">
<CardHeader
title={__('Preview', 'pojo-accessibility')}
subheader={
<Typography variant="body2">
{__(
'This is what the widget will look like to your site viewers.',
'pojo-accessibility',
)}
</Typography>
}
sx={{ paddingBottom: 0 }}
/>
<StyledPreview id="ea11y-widget-preview--container"></StyledPreview>
</Card>
<WidgetLoader />
</>
);
};
export default WidgetPreview;