diff --git a/src/webapp/layout/story/StoryHeader.tsx b/src/webapp/layout/story/StoryHeader.tsx index 9832ec6..6dddc8f 100644 --- a/src/webapp/layout/story/StoryHeader.tsx +++ b/src/webapp/layout/story/StoryHeader.tsx @@ -1,7 +1,12 @@ import React from "react"; import styled from "@emotion/styled"; import { StoryHeaderButton } from "./story-button/StoryButton"; -import { Title, Text } from "@mantine/core"; +import { + Title, + Text, + TextProps, + createPolymorphicComponent, +} from "@mantine/core"; import { StoryButtonTypes } from "../../../types"; interface Props { @@ -22,24 +27,17 @@ export const StoryHeader: React.FC = ({ storyButtons, label, }) => { + const StyledDescription = createPolymorphicComponent<"button", TextProps>( + Description + ); + return (
{title && {title}} - {description && ( - - {description} - - )} + {description && {description}} {storyButtons && @@ -48,7 +46,7 @@ export const StoryHeader: React.FC = ({ @@ -102,3 +100,10 @@ const Label = styled.label({ marginBottom: 0, marginTop: 0, }); + +const Description = styled(Text)({ + fontSize: "1.25rem", + color: "var(--text-secondary)", + maxWidth: "860px", + marginBottom: "16px", +}); diff --git a/src/webapp/layout/story/story-button/StoryButton.tsx b/src/webapp/layout/story/story-button/StoryButton.tsx index 61a85c2..17d45d9 100644 --- a/src/webapp/layout/story/story-button/StoryButton.tsx +++ b/src/webapp/layout/story/story-button/StoryButton.tsx @@ -1,6 +1,11 @@ import React from "react"; import styled from "@emotion/styled"; -import { Text, Badge } from "@mantine/core"; +import { + Text, + Badge, + createPolymorphicComponent, + TextProps, +} from "@mantine/core"; import { InlineCodeHighlight } from "@mantine/code-highlight"; import FigmaIcon from "./icons/figma-icon"; import GitHubIcon from "./icons/github-icon"; @@ -117,6 +122,9 @@ const StoryButton = ({ url: string; }) => { const Icon = icon; + const StyledStoryButtonText = createPolymorphicComponent<"button", TextProps>( + StoryButtonText + ); return ( @@ -125,17 +133,7 @@ const StoryButton = ({ {Icon} - - {title} - + {title} ); @@ -163,3 +161,11 @@ const FlexItem = styled("div")({ display: "flex", alignItems: "center", }); + +const StoryButtonText = styled(Text)({ + color: "var(--text-primary)", + textDecoration: "underline", + textDecorationColor: "var(--text-secondary)", + textDecorationStyle: "dotted", + textUnderlineOffset: "5px", +});