mirror of
https://github.com/vercel/commerce.git
synced 2025-06-20 06:01:21 +00:00
Add title to page and add styling for base typography elements for Text component
This commit is contained in:
parent
559451f958
commit
432128f655
@ -13,3 +13,64 @@
|
||||
.sectionHeading {
|
||||
@apply pt-1 pb-2 text-2xl font-bold tracking-wide cursor-pointer mb-2;
|
||||
}
|
||||
|
||||
|
||||
/* Apply base font sizes and styles for typography markup (h2, h2, ul, p, etc.).
|
||||
A helpful addition for whenn page content is consumed from a source managed through a wysiwyg editor. */
|
||||
|
||||
.body :is(h1, h2, h3, h4, h5, h6, p, ul, ol) {
|
||||
@apply mb-4;
|
||||
}
|
||||
|
||||
.body :is(h1, h2, h3, h4, h5, h6):not(:first-child) {
|
||||
@apply mt-8;
|
||||
}
|
||||
|
||||
.body :is(h1, h2, h3, h4, h5, h6) {
|
||||
@apply font-semibold tracking-wide;
|
||||
}
|
||||
|
||||
.body h1 {
|
||||
@apply text-5xl;
|
||||
}
|
||||
|
||||
.body h2 {
|
||||
@apply text-4xl;
|
||||
}
|
||||
|
||||
.body h3 {
|
||||
@apply text-3xl;
|
||||
}
|
||||
|
||||
.body h4 {
|
||||
@apply text-2xl;
|
||||
}
|
||||
|
||||
.body h5 {
|
||||
@apply text-xl;
|
||||
}
|
||||
|
||||
.body h6 {
|
||||
@apply text-lg;
|
||||
}
|
||||
|
||||
.body ul,
|
||||
.body ol {
|
||||
@apply pl-6;
|
||||
}
|
||||
|
||||
.body ul {
|
||||
@apply list-disc;
|
||||
}
|
||||
|
||||
.body ol {
|
||||
@apply list-decimal;
|
||||
}
|
||||
|
||||
.body a {
|
||||
@apply underline;
|
||||
}
|
||||
|
||||
.body a:hover {
|
||||
@apply no-underline;
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ export default function Pages({
|
||||
<h1>Loading...</h1> // TODO (BC) Add Skeleton Views
|
||||
) : (
|
||||
<div className="max-w-2xl mx-8 sm:mx-auto py-20">
|
||||
{page?.name && <Text variant="heading">{page.name}</Text>}
|
||||
{page?.body && <Text html={page.body} />}
|
||||
</div>
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user