aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/components/blog/Date.tsx
blob: 506eeccf75732ec809ca55d802cacfb506e18f3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { ReactNode } from "react";

function Date({
  children,
  update = null,
}: {
  children: ReactNode;
  update?: string;
}) {
  return (
    <div className="text-sm mt-2 text-center text-gray-500 dark:text-gray-400 font-space-grotesk">
      {children}

      {update != null && (
        <div className="text-xs mt-1 text-center">Last updated {update}</div>
      )}
    </div>
  );
}

export default Date;