Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

with-label.tsx 652B

1234567891011121314151617181920212223
  1. import type { FC } from 'react'
  2. import type { DividerProps } from '.'
  3. import Divider from '.'
  4. import classNames from '@/utils/classnames'
  5. export type DividerWithLabelProps = DividerProps & {
  6. label: string
  7. }
  8. export const DividerWithLabel: FC<DividerWithLabelProps> = (props) => {
  9. const { label, className, ...rest } = props
  10. return <div
  11. className="flex items-center gap-2 my-2"
  12. >
  13. <Divider {...rest} className={classNames('flex-1', className)} />
  14. <span className="text-text-tertiary text-xs">
  15. {label}
  16. </span>
  17. <Divider {...rest} className={classNames('flex-1', className)} />
  18. </div>
  19. }
  20. export default DividerWithLabel