Skip to content

Commit

Permalink
chore: use prose for set margins on content
Browse files Browse the repository at this point in the history
  • Loading branch information
pregno committed Dec 2, 2024
1 parent 356996e commit 7d8de7e
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 60 deletions.
32 changes: 0 additions & 32 deletions apps/docs/src/components/document/common/mdx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,38 +97,6 @@ export type MdxProps = {
};

const standardComponents: MDXComponents = {
h1: ({ children, id }) => (
<Heading as="h1" id={id}>
{children}
</Heading>
),
h2: ({ children, id }) => (
<Heading as="h2" id={id}>
{children}
</Heading>
),
h3: ({ children, id }) => (
<Heading as="h3" id={id}>
{children}
</Heading>
),
h4: ({ children, id }) => (
<Heading as="h4" id={id}>
{children}
</Heading>
),
h5: ({ children, id }) => (
<Heading as="h5" id={id}>
{children}
</Heading>
),
h6: ({ children, id }) => (
<Heading as="h6" id={id}>
{children}
</Heading>
),
p: ({ children }) => <Paragraph>{children}</Paragraph>,
span: ({ children }) => <Paragraph as="span">{children}</Paragraph>,
a: ({ children, href }) =>
href ? <Link href={href}>{children}</Link> : null,
ul: ({ children }) => <ul className="gi-list-bullet">{children}</ul>,
Expand Down
108 changes: 80 additions & 28 deletions packages/design/tailwind/src/create-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,37 +305,50 @@ export function createTheme(
p: {
font: variables.semantic.typography.default.text.md,
fontWeight: variables.primitive.font.weight['400'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-bottom': '2em',
},
h1: {
font: variables.semantic.typography.default.heading.xl,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h2: {
font: variables.semantic.typography.default.heading.lg,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h3: {
font: variables.semantic.typography.default.heading.md,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h4: {
font: variables.semantic.typography.default.heading.sm,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h5: {
font: variables.semantic.typography.default.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h6: {
font: variables.semantic.typography.default.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
},
},
Expand All @@ -344,37 +357,50 @@ export function createTheme(
p: {
font: variables.semantic.typography.xs.text.md,
fontWeight: variables.primitive.font.weight['400'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-bottom': '2em',
},
h1: {
font: variables.semantic.typography.xs.heading.xl,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h2: {
font: variables.semantic.typography.xs.heading.lg,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h3: {
font: variables.semantic.typography.xs.heading.md,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h4: {
font: variables.semantic.typography.xs.heading.sm,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h5: {
font: variables.semantic.typography.xs.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h6: {
font: variables.semantic.typography.xs.heading['2xs'],
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
},
},
Expand All @@ -383,37 +409,50 @@ export function createTheme(
p: {
font: variables.semantic.typography.md.text.md,
fontWeight: variables.primitive.font.weight['400'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-bottom': '2em',
},
h1: {
font: variables.semantic.typography.md.heading.xl,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h2: {
font: variables.semantic.typography.md.heading.lg,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h3: {
font: variables.semantic.typography.md.heading.md,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h4: {
font: variables.semantic.typography.md.heading.sm,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h5: {
font: variables.semantic.typography.md.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h6: {
font: variables.semantic.typography.md.heading['2xs'],
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
},
},
Expand All @@ -422,37 +461,50 @@ export function createTheme(
p: {
font: variables.semantic.typography.xl.text.md,
fontWeight: variables.primitive.font.weight['400'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-bottom': '2em',
},
h1: {
font: variables.semantic.typography.xl.heading.xl,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h2: {
font: variables.semantic.typography.xl.heading.lg,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h3: {
font: variables.semantic.typography.xl.heading.md,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h4: {
font: variables.semantic.typography.xl.heading.sm,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h5: {
font: variables.semantic.typography.xl.heading.xs,
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
h6: {
font: variables.semantic.typography.xl.heading['2xs'],
fontWeight: variables.primitive.font.weight['700'],
fontFamily: 'inherit',
fontFamily: variables.primitive.font.family.primary,
'margin-top': '0.5em',
'margin-bottom': '1em',
},
},
},
Expand Down

0 comments on commit 7d8de7e

Please sign in to comment.