From 3469b5bfe9b79240ba1d7162e3b8eda5f60d32b4 Mon Sep 17 00:00:00 2001 From: DrMint Date: Fri, 13 May 2022 21:06:46 +0200 Subject: [PATCH] Improved layout on mobile and avoid overflow --- src/components/Panels/ContentPanel.tsx | 2 +- src/components/PreviewCard.tsx | 6 +++--- src/pages/contents/index.tsx | 2 +- src/pages/library/index.tsx | 2 +- tailwind.config.js | 8 ++++++++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/Panels/ContentPanel.tsx b/src/components/Panels/ContentPanel.tsx index da23a00..2f6beb5 100644 --- a/src/components/Panels/ContentPanel.tsx +++ b/src/components/Panels/ContentPanel.tsx @@ -17,7 +17,7 @@ export default function ContentPanel(props: Immutable): JSX.Element { width === ContentPanelWidthSizes.default ? "max-w-2xl" : "w-full"; return ( -
+
): JSX.Element {
)}
- {pre_title &&

{pre_title}

} + {pre_title &&

{pre_title}

} {title && ( -

{title}

+

{title}

)} - {subtitle &&

{subtitle}

} + {subtitle &&

{subtitle}

}
{description &&

{description}

} {bottomChips && bottomChips.length > 0 && ( diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 301421a..7693689 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -83,7 +83,7 @@ export default function Contents(props: Immutable): JSX.Element { )}
{items.map((item) => ( diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index 2e9696b..ec9f9f4 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -156,7 +156,7 @@ export default function Library(props: Immutable): JSX.Element { )}
diff --git a/tailwind.config.js b/tailwind.config.js index 5beab85..03baaca 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -159,5 +159,13 @@ module.exports = { }, }); }), + + plugin(function ({ addUtilities }) { + addUtilities({ + ".break-words": { + "word-break": "break-word", + }, + }); + }), ], };