microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
packages/html-program-viewer/src/common.tsx
23lines · modecode
| 1 | import { FunctionComponent, ReactElement } from "react"; |
| 2 | import { Colors } from "./constants.js"; |
| 3 | |
| 4 | export const Literal: FunctionComponent<{ children: any }> = ({ children }) => ( |
| 5 | <div css={{ color: Colors.literal, display: "inline" }}>{children}</div> |
| 6 | ); |
| 7 | |
| 8 | export const KeyValueSection: FunctionComponent<{ children: ReactElement | ReactElement[] }> = ({ |
| 9 | children, |
| 10 | }) => { |
| 11 | return ( |
| 12 | <ul |
| 13 | css={{ |
| 14 | margin: 0, |
| 15 | padding: "0 0 0 16px", |
| 16 | borderLeft: `1px dashed ${Colors.indentationGuide}`, |
| 17 | overflow: "auto", |
| 18 | }} |
| 19 | > |
| 20 | {children} |
| 21 | </ul> |
| 22 | ); |
| 23 | }; |
| 24 | |