import * as React from "react"; import styled from "styled-components"; import * as tokens from "@tokens"; import { mq } from "@tokensDir/media-query"; import { dim } from "@dim"; import { Body } from "@Typography"; import { CreditProps, CreditShareItemProps } from "./interface"; const Credits = styled.section` display: flex; flex-direction: column; justify-content: space-between; border-top: 1px solid ${tokens.colorGrey15}; border-bottom: 1px solid ${tokens.colorGrey15}; padding-top: ${dim(4)}; padding-bottom: ${dim(4)}; ${mq.lg` flex-direction: row; `} `; const CreditItems = styled.div` text-align: center; margin-bottom: ${dim(4)}; ${mq.lg` margin-bottom: 0; text-align: initial; `} `; const CreditShare = styled.div` display: flex; align-items: center; justify-content: center; ${mq.lg` justify-content: initial; `} `; const CreditItem = styled(Body)` font-weight: ${tokens.fontWeightSemiBold}; margin: 0; text-transform: uppercase; ${mq.lg` display: inline-block; & + & { margin-left: ${dim(11)}; } `} `; const StyledCreditShareItem = styled.a` display: inline-flex; margin-left: ${dim(5)}; `; const StyledCreditSVG = styled.object` max-width: 20px; pointer-events: none; `; export const CreditBody: React.FC = ({ children }) => ( {children} ); export const CreditShareItem: React.FC = ({ data, url }) => ( ); const StoryCreditShare: React.FC = ({ author = "", photosBy = "", videosBy = "" }) => ( {author && Words By {author}} {photosBy && Photography By {photosBy}} {videosBy && Video By {videosBy}} Share ); export default StoryCreditShare;