Rename v1 to web-check-live
This commit is contained in:
24
src/web-check-live/components/Results/Screenshot.tsx
Normal file
24
src/web-check-live/components/Results/Screenshot.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Card } from 'web-check-live/components/Form/Card';
|
||||
|
||||
const cardStyles = `
|
||||
overflow: auto;
|
||||
max-height: 50rem;
|
||||
grid-row: span 2;
|
||||
img {
|
||||
border-radius: 6px;
|
||||
width: 100%;
|
||||
margin 0.5rem 0;;
|
||||
}
|
||||
`;
|
||||
|
||||
const ScreenshotCard = (props: { data: { image?: string, data?: string, }, title: string, actionButtons: any }): JSX.Element => {
|
||||
const screenshot = props.data;
|
||||
return (
|
||||
<Card heading={props.title} actionButtons={props.actionButtons} styles={cardStyles}>
|
||||
{ screenshot.image && <img src={`data:image/png;base64,${screenshot.image}`} alt="Full page screenshot" /> }
|
||||
{ (!screenshot.image && screenshot.data) && <img src={screenshot.data} alt="Full page screenshot" /> }
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
export default ScreenshotCard;
|
||||
Reference in New Issue
Block a user