Files
outline/app/components/Text.ts
Tom Moor d02d3cb55d feat: Add import/export of documents as JSON (#4621)
* feat: Add export of documents as JSON

* Rename, add structured collection description

* stash

* ui

* Add entity creation data to JSON archive

* Import JSON UI plumbing

* stash

* Messy, but working

* tsc

* tsc
2023-01-29 10:24:44 -08:00

42 lines
1017 B
TypeScript

import styled from "styled-components";
type Props = {
type?: "secondary" | "tertiary" | "danger";
size?: "large" | "small" | "xsmall";
weight?: "bold" | "normal";
};
/**
* Use this component for all interface text that should not be selectable
* by the user, this is the majority of UI text explainers, notes, headings.
*/
const Text = styled.p<Props>`
margin-top: 0;
color: ${(props) =>
props.type === "secondary"
? props.theme.textSecondary
: props.type === "tertiary"
? props.theme.textTertiary
: props.type === "danger"
? props.theme.brand.red
: props.theme.text};
font-size: ${(props) =>
props.size === "large"
? "18px"
: props.size === "small"
? "14px"
: props.size === "xsmall"
? "13px"
: "inherit"};
font-weight: ${(props) =>
props.weight === "bold"
? "bold"
: props.weight === "normal"
? "normal"
: "inherit"};
white-space: normal;
user-select: none;
`;
export default Text;