Skip to content

Commit

Permalink
style fix word wrapping, and font sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
macklinhrw committed Nov 14, 2021
1 parent abde90e commit c987111
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/poems/[slug].tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRouter } from "next/dist/client/router";
import { useGetPoemBySlugQuery } from "../../generated/graphql";
import { Navbar } from "../../components/Nav/Navbar";
import { VStack, Box, Text } from "@chakra-ui/react"
import { VStack, Box, Text, Flex } from "@chakra-ui/react"

const PoemsPage = () => {
const router = useRouter();
Expand All @@ -20,14 +20,14 @@ const PoemsPage = () => {
return (
<>
<Navbar />
<Box mx="auto" w="max">
<Box mx="auto" w="max" maxW="100%">
{data?.getPoemBySlug && (
<VStack mt="10">
<Text as="h1" fontSize={{ base: "xl", lg: "2xl" }} fontWeight="bold" fontFamily="serif">{data.getPoemBySlug.title}</Text>
<Text>
<Text wordBreak="break-word">
{data.getPoemBySlug.content.split("\n").map((line) => {
return (
<Text textAlign="center" fontSize={{ base: "lg", lg: "xl" }} fontFamily="serif">{line}</Text>
<Text wordBreak="break-word" textAlign="center" fontSize={{ sm: "md", md: "lg", lg: "xl" }} fontFamily="serif">{line}</Text>
)
})}
</Text>
Expand Down

1 comment on commit c987111

@vercel
Copy link

@vercel vercel bot commented on c987111 Nov 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.