field.tsx 512 B

123456789101112131415161718192021222324252627
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. type Props = {
  5. label: string
  6. children: React.ReactNode
  7. }
  8. const Field: FC<Props> = ({
  9. label,
  10. children,
  11. }) => {
  12. return (
  13. <div className='flex items-start space-x-2'>
  14. <div className='system-xs-medium w-[128px] shrink-0 items-center truncate py-1 text-text-tertiary'>
  15. {label}
  16. </div>
  17. <div className='w-[244px] shrink-0'>
  18. {children}
  19. </div>
  20. </div>
  21. )
  22. }
  23. export default React.memo(Field)