您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

SectionTitle.tsx 585B

123456789101112131415161718192021222324
  1. import React from 'react'
  2. import { Typography, Divider } from 'antd';
  3. const { Title } = Typography;
  4. type SectionTitleProps = {
  5. title: string
  6. }
  7. const SectionTitle: React.FC<SectionTitleProps> = ({ title }) => {
  8. return (
  9. <div className='relative bg-black'>
  10. <Divider />
  11. <Title
  12. level={5}
  13. className="absolute left-1/2 -translate-x-1/2 -top-3 bg-white px-2 text-white"
  14. style={{ margin: 0 }}
  15. >
  16. {title}
  17. </Title>
  18. </div>
  19. )
  20. }
  21. export default SectionTitle