summaryrefslogtreecommitdiff
path: root/components/Sidebar/Title.tsx
blob: 791cbb86e1d1394e3c9c40d05297e5483cddb9ec (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { Flex, Heading } from '@chakra-ui/react'
import React from 'react'

import { OrgRoamNode } from '../../api'
export interface TitleProps {
  previewNode: OrgRoamNode | undefined
}

export const Title = (props: TitleProps) => {
  const { previewNode } = props
  return (
    <Flex maxW="90%">
      {/* <BiFile
       * // onContextMenu={(e) => {
       * //   e.preventDefault()
       * //   openContextMenu(previewNode, e)
       * // }}
       * /> */}
      <Heading lineHeight={1.2} size="md" fontWeight={600} pt={4}>
        {previewNode?.title}
      </Heading>
    </Flex>
  )
}