From 56fc9a2e725ba7aceeb36d06e98b96d0bd6609ef Mon Sep 17 00:00:00 2001 From: andreidekterev Date: Mon, 19 Jun 2023 21:30:36 +0700 Subject: [PATCH] feat(#680): add embed component --- .../components/EmbeddedComponent.tsx | 39 +++++++++++++++++++ src/pages/StatsView/hooks.tsx | 4 +- src/pages/StatsView/index.tsx | 5 ++- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 src/pages/StatsView/components/EmbeddedComponent.tsx diff --git a/src/pages/StatsView/components/EmbeddedComponent.tsx b/src/pages/StatsView/components/EmbeddedComponent.tsx new file mode 100644 index 00000000..27a4798e --- /dev/null +++ b/src/pages/StatsView/components/EmbeddedComponent.tsx @@ -0,0 +1,39 @@ +import styled from 'styled-components/macro' + +import { ButtonSolid, Input } from 'features/Common' + +const EmbedContainer = styled.div` + display: flex; + flex-direction: column; + align-items: center; + max-width: 100%; +` + +const EmbedInput = styled(Input)` + margin: 0; + max-width: 400px; + wrapperHeight: none; +` + +type EmbedProps = { + url: string, +} + +export const EmbeddedComponent = ({ url }:EmbedProps) => { + const iframeString = `