aboutsummaryrefslogtreecommitdiffstats
path: root/thallium-frontend/src/components/MaxWidthContainer.tsx
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-08-25 04:04:14 +0100
committerGravatar Joe Banks <[email protected]>2024-08-25 04:04:14 +0100
commita828759694a3606bd2154e85696535311b18f824 (patch)
treeeb7da5dbdc0bd1ad23517bf639b9ad540040e3e0 /thallium-frontend/src/components/MaxWidthContainer.tsx
parentAdd top margin to header (diff)
Make max-width opt in via new container
Diffstat (limited to 'thallium-frontend/src/components/MaxWidthContainer.tsx')
-rw-r--r--thallium-frontend/src/components/MaxWidthContainer.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/thallium-frontend/src/components/MaxWidthContainer.tsx b/thallium-frontend/src/components/MaxWidthContainer.tsx
new file mode 100644
index 0000000..40441a0
--- /dev/null
+++ b/thallium-frontend/src/components/MaxWidthContainer.tsx
@@ -0,0 +1,8 @@
+import styled from "styled-components";
+
+const MaxWidthContainer = styled.div<{ maxWidth?: number }>`
+max-width: ${({ maxWidth }) => maxWidth ? `${maxWidth.toString()}px` : "800px"};
+width: 100%;
+`;
+
+export default MaxWidthContainer;