diff --git a/packages/frontend/react-components/src/index.ts b/packages/frontend/react-components/src/index.ts index 930840a3..bd501725 100644 --- a/packages/frontend/react-components/src/index.ts +++ b/packages/frontend/react-components/src/index.ts @@ -1,3 +1,5 @@ export * from "./button/Button"; export * from "./text/Text"; +export * from "./nowrap/NoWrap"; +export * from "./spacer/Spacer"; export * from "./theme-provider/ThemeProvider"; \ No newline at end of file diff --git a/packages/frontend/react-components/src/nowrap/NoWrap.tsx b/packages/frontend/react-components/src/nowrap/NoWrap.tsx new file mode 100644 index 00000000..84025bae --- /dev/null +++ b/packages/frontend/react-components/src/nowrap/NoWrap.tsx @@ -0,0 +1,16 @@ +import * as React from "react"; + +const space = { + flex: "1", + pointerEvents: "none" +} as const; + +export const Spacer: React.FC = props => ( +
+); \ No newline at end of file diff --git a/packages/frontend/react-components/src/spacer/Spacer.tsx b/packages/frontend/react-components/src/spacer/Spacer.tsx new file mode 100644 index 00000000..4dd43773 --- /dev/null +++ b/packages/frontend/react-components/src/spacer/Spacer.tsx @@ -0,0 +1,23 @@ +import * as React from "react"; + +const noWrap = { whiteSpace: "nowrap" } as const; + +/** + * Sometimes with text-wrapping its desired to ensure a string of words appear + * on the same line, or to avoid the one word on a line scenario + * @example + * // OH NO + * big + * apple + * // WINNING + * big apple + */ +export const NoWrap: React.FC = props => ( + +); \ No newline at end of file