import * as React from "react"; import * as Constants from "~/common/constants"; import * as Validations from "~/common/validations"; import * as Window from "~/common/window"; import * as SVG from "~/common/svg"; import * as Actions from "~/common/actions"; import * as Events from "~/common/custom-events"; import * as System from "~/components/system"; import { css } from "@emotion/react"; import { PrimaryTabGroup } from "~/components/core/TabGroup"; import ScenePage from "~/components/core/ScenePage"; import SlateMediaObjectPreview from "~/components/core/SlateMediaObjectPreview"; import ScenePageHeader from "~/components/core/ScenePageHeader"; const STYLES_VIDEO_BIG = css` display: block; background-color: ${Constants.system.moonstone}; padding: 0; outline: 0; margin: 48px auto 88px auto; border-radius: 4px; width: 100%; box-shadow: 0px 10px 50px 20px rgba(0, 0, 0, 0.1); @media (max-width: ${Constants.sizes.tablet}px) { margin: 32px auto 64px auto; } @media (max-width: ${Constants.sizes.mobile}px) { margin: 24px auto 48px auto; } `; const STYLES_IMAGE_BOX = css` cursor: pointer; position: relative; box-shadow: ${Constants.shadow.light}; margin: 10px; :hover { box-shadow: ${Constants.shadow.medium}; } `; const STYLES_TEXT_AREA = css` position: absolute; bottom: 0px; left: 0px; `; const STYLES_TITLE = css` overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${Constants.system.white}; font-family: ${Constants.font.medium}; margin-bottom: 4px; width: calc(100% - 32px); padding: 0px 16px; box-sizing: content-box; `; const STYLES_SECONDARY = css` ${STYLES_TITLE} font-size: ${Constants.typescale.lvlN1}; margin-bottom: 16px; width: 100%; `; const STYLES_GRADIENT = css` background: linear-gradient( 180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 26.56%, rgba(0, 0, 0, 0.3) 100% ); backdrop-filter: blur(2px); width: 100%; height: 72px; position: absolute; bottom: 0px; left: 0px; `; const STYLES_ACTIVITY_GRID = css` margin: -10px; display: flex; flex-direction: row; flex-wrap: wrap; `; class ActivitySquare extends React.Component { state = { showText: false, }; render() { const item = this.props.item; const size = this.props.size; const isImage = Validations.isPreviewableImage(item.file.type); return (