✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
style ads for editor view
AykutSarac5472c693e54d
diff --git a/src/components/CarbonAds/index.tsx b/src/components/CarbonAds/index.tsxindex e122605b..61c087f3 100644--- a/src/components/CarbonAds/index.tsx+++ b/src/components/CarbonAds/index.tsx@@ -1,17 +1,25 @@import React from "react";import styled from "styled-components";-const StyledWrapper = styled.span`+const StyledWrapper = styled.span<{ editor?: boolean }>`#carbonads {width: 100%;display: flex;- border-radius: 0;}- #carbonads > span {- max-width: 100%;- width: 100%;+ ${({ theme, editor }) =>+ editor &&+ `+ #carbonads {+ border-radius: 0;+ border-top: 1px solid ${theme.BACKGROUND_MODIFIER_ACCENT};+ }++ #carbonads > span {+ max-width: 100%;+ width: 100%;}+ `};@media all and (display-mode: standalone) {#carbonads {@@ -20,9 +28,11 @@ const StyledWrapper = styled.span`}`;-export const CarbonAds = () => {+export const CarbonAds: React.FC<{ editor?: boolean }> = ({+ editor = false,+}) => {return (- <StyledWrapper>+ <StyledWrapper editor={editor}><scriptdefertype="text/javascript"diff --git a/src/containers/JsonEditor/index.tsx b/src/containers/JsonEditor/index.tsxindex ea98cc0f..de205ad1 100644--- a/src/containers/JsonEditor/index.tsx+++ b/src/containers/JsonEditor/index.tsx@@ -82,7 +82,7 @@ export const JsonEditor: React.FC = () => {loading={<Loading message="Loading Editor..." />}onChange={(value) => setValue(value as string)}/>- <CarbonAds />+ <CarbonAds editor /></StyledWrapper></StyledEditorWrapper>);