index.tsx 700 B

12345678910111213141516171819202122232425262728293031
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import GroupName from '@/app/components/app/configuration/base/group-name'
  5. export type IFeatureGroupProps = {
  6. title: string
  7. description?: string
  8. children: React.ReactNode
  9. }
  10. const FeatureGroup: FC<IFeatureGroupProps> = ({
  11. title,
  12. description,
  13. children,
  14. }) => {
  15. return (
  16. <div className='mb-6'>
  17. <div className='mb-2'>
  18. <GroupName name={title} />
  19. {description && (
  20. <div className='text-xs font-normal text-gray-500'>{description}</div>
  21. )}
  22. </div>
  23. <div className='space-y-2'>
  24. {children}
  25. </div>
  26. </div>
  27. )
  28. }
  29. export default React.memo(FeatureGroup)