import React, { FC, CSSProperties, ReactNode } from "react"; import { css, cx } from "@emotion/css"; import { rowMiddle, rowParted } from "@worktools/flex-styles"; let DocDemo: FC<{ title: string; link?: string; className?: string; style?: CSSProperties; children?: ReactNode; }> = React.memo((props) => { if (props.children == null) { return TODO, no children yet; } /** Methods */ /** Effects */ /** Renderers */ return (
{props.title} {props.title ? ( {props.link != null ? "Source file" : "No link"} ) : null}
{props.children}
); }); export default DocDemo; let styleContainer = css` margin: 24px 16px; max-width: 800px; border-radius: 4px; border: 1px solid hsl(0, 0%, 90%); `; let styleDemoArea = css` min-height: 160px; min-width: 360px; padding: 16px; `; let styleHeader = css` padding: 12px 12px; font-size: 18px; font-weight: 300; font-family: Helvetica Neue, Arial, Helvetica, sans-serif; background-color: hsl(0, 0%, 96%); border-bottom: 1px solid hsl(0, 0%, 90%); `; let styleTitle = css` margin-right: 8px; color: #333; `; let styleLink = css` font-size: 12px; `; let styleEmpty = css` color: hsl(0, 0%, 80%); `;