File size: 2,007 Bytes
9b906ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import React from "react";
import { ExtraProps } from "react-markdown";

// Custom component to render <h1> in markdown
export function h1({
  children,
}: React.ClassAttributes<HTMLHeadingElement> &
  React.HTMLAttributes<HTMLHeadingElement> &
  ExtraProps) {
  return (
    <h1 className="text-xl text-white font-medium leading-7 mb-3 mt-4 first:mt-0">
      {children}
    </h1>
  );
}

// Custom component to render <h2> in markdown
export function h2({
  children,
}: React.ClassAttributes<HTMLHeadingElement> &
  React.HTMLAttributes<HTMLHeadingElement> &
  ExtraProps) {
  return (
    <h2 className="text-lg font-medium leading-6 -tracking-[0.01em] text-white mb-2.5 mt-4 first:mt-0">
      {children}
    </h2>
  );
}

// Custom component to render <h3> in markdown
export function h3({
  children,
}: React.ClassAttributes<HTMLHeadingElement> &
  React.HTMLAttributes<HTMLHeadingElement> &
  ExtraProps) {
  return (
    <h3 className="text-base font-medium text-white mb-2 mt-3 first:mt-0">
      {children}
    </h3>
  );
}

// Custom component to render <h4> in markdown
export function h4({
  children,
}: React.ClassAttributes<HTMLHeadingElement> &
  React.HTMLAttributes<HTMLHeadingElement> &
  ExtraProps) {
  return (
    <h4 className="text-sm font-medium text-white mb-1.5 mt-3 first:mt-0">
      {children}
    </h4>
  );
}

// Custom component to render <h5> in markdown
export function h5({
  children,
}: React.ClassAttributes<HTMLHeadingElement> &
  React.HTMLAttributes<HTMLHeadingElement> &
  ExtraProps) {
  return (
    <h5 className="text-sm font-normal text-[var(--oh-text-tertiary)] mb-1.5 mt-2.5 first:mt-0">
      {children}
    </h5>
  );
}

// Custom component to render <h6> in markdown
export function h6({
  children,
}: React.ClassAttributes<HTMLHeadingElement> &
  React.HTMLAttributes<HTMLHeadingElement> &
  ExtraProps) {
  return (
    <h6 className="text-sm font-normal text-[var(--oh-text-tertiary)] mb-1.5 mt-2.5 first:mt-0">
      {children}
    </h6>
  );
}