|
@@ -1,17 +1,25 @@
|
|
import React from "react";
|
|
import React from "react";
|
|
import styled from "styled-components";
|
|
import styled from "styled-components";
|
|
|
|
|
|
-const StyledWrapper = styled.span`
|
|
|
|
|
|
+const StyledWrapper = styled.span<{ editor?: boolean }>`
|
|
#carbonads {
|
|
#carbonads {
|
|
width: 100%;
|
|
width: 100%;
|
|
display: flex;
|
|
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) {
|
|
@media all and (display-mode: standalone) {
|
|
#carbonads {
|
|
#carbonads {
|
|
@@ -20,9 +28,11 @@ const StyledWrapper = styled.span`
|
|
}
|
|
}
|
|
`;
|
|
`;
|
|
|
|
|
|
-export const CarbonAds = () => {
|
|
|
|
|
|
+export const CarbonAds: React.FC<{ editor?: boolean }> = ({
|
|
|
|
+ editor = false,
|
|
|
|
+}) => {
|
|
return (
|
|
return (
|
|
- <StyledWrapper>
|
|
|
|
|
|
+ <StyledWrapper editor={editor}>
|
|
<script
|
|
<script
|
|
defer
|
|
defer
|
|
type="text/javascript"
|
|
type="text/javascript"
|