diff --git a/app/components/InputSelect.tsx b/app/components/InputSelect.tsx index 26980f650..ee0960ee7 100644 --- a/app/components/InputSelect.tsx +++ b/app/components/InputSelect.tsx @@ -174,7 +174,7 @@ const InputSelect = (props: Props, ref: React.RefObject) => { {opt.description && ( <>   - + – {opt.description} diff --git a/app/components/Text.ts b/app/components/Text.ts index 88070b0a6..07dd36e69 100644 --- a/app/components/Text.ts +++ b/app/components/Text.ts @@ -1,11 +1,19 @@ import styled, { css } from "styled-components"; +import { ellipsis } from "@shared/styles"; type Props = { + /** The type of text to render */ type?: "secondary" | "tertiary" | "danger"; + /** The size of the text */ size?: "xlarge" | "large" | "medium" | "small" | "xsmall"; + /** The direction of the text (defaults to ltr) */ dir?: "ltr" | "rtl" | "auto"; + /** Whether the text should be selectable (defaults to false) */ selectable?: boolean; + /** The font weight of the text */ weight?: "bold" | "normal"; + /** Whether the text should be truncated with an ellipsis */ + ellipsis?: boolean; }; /** @@ -48,6 +56,8 @@ const Text = styled.span` white-space: normal; user-select: ${(props) => (props.selectable ? "text" : "none")}; + + ${(props) => props.ellipsis && ellipsis()} `; export default Text;