summaryrefslogtreecommitdiff
path: root/components/Sidebar/Title.tsx
blob: 2c8d8b71388f63dece964230cc340b136b9ac0b0 (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
25
import { Flex, Heading } from '@chakra-ui/react'
import React from 'react'
import { BiFile } from 'react-icons/bi'

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>
  )
}