// Dependencies import { serverSideTranslations } from 'next-i18next/serverSideTranslations' // Context import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs' // Hooks import { useContext } from 'react' // Components import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs' import { Popout } from 'shared/components/popout/index.mjs' import { Collapse } from 'shared/components/collapse.mjs' import { BoolYesIcon, BoolNoIcon } from 'shared/components/icons.mjs' // Translation namespaces used on this page const ns = pageNs // Re-use this const p = (

This paragraph is here to show the vertical spacing between headings and paragraphs. In addition, let's make it a bit longer so we can see the line height as the text wraps.

) const TypographyPage = ({ page }) => { const { setLoadingStatus, loading, LoadingProgress } = useContext(LoadingStatusContext) const loadingProgression = () => { let delay = 0 for (let i = 1; i < 51; i++) { delay += 25 window.setTimeout( () => setLoadingStatus( i === 50 ? [true, 'All done!', true, true] : [true, ] ), delay ) } } return (

This typography page shows an overview of different elements and how they are styled.

It's a good starting point for theme development.

Headings (this is h2)

{p} {p}

This is h3

{p} {p}

This is h4

{p} {p}
This is h5
{p} {p}
This is h6
{p} {p}

Links and buttons

A regular link looks like this, whereas buttons look like this:

Main button styles

State button styles

Other button styles

Outlined button styles

Button sizes

Popouts

The Popout component is what powers various custom MDX components under the hood:

{['note', 'tip', 'warning', 'fixme', 'link', 'related', 'none'].map((type) => { const props = {} props[type] = true return (

{type}

I am the {type} title
{p}
) })}

Collapse

{['primary', 'secondary', 'accent', 'neutral', 'success', 'info', 'warning', 'error'].map( (color) => (

I am a collapse in the {color} color

) )}

Loading state

Loading: {loading ? : }

) } export default TypographyPage export async function getStaticProps({ locale }) { return { props: { ...(await serverSideTranslations(locale, ns)), page: { locale, path: ['typography'], }, }, } }