mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-05-07 13:54:42 +02:00
18 lines
596 B
TypeScript
18 lines
596 B
TypeScript
import * as React from 'react';
|
|
import Head from 'next/head';
|
|
import { Extension } from '../../constants/extension';
|
|
|
|
export interface ITitleProps {
|
|
value: string;
|
|
}
|
|
|
|
export const Title: React.FunctionComponent<ITitleProps> = ({value}: React.PropsWithChildren<ITitleProps>) => {
|
|
return (
|
|
<Head>
|
|
<title>{value} | {Extension.name}</title>
|
|
<meta name="title" content={`${value} | ${Extension.name}`} />
|
|
<meta property="og:title" content={`${value} | ${Extension.name}`} />
|
|
<meta property="twitter:title" content={`${value} | ${Extension.name}`} />
|
|
</Head>
|
|
);
|
|
}; |