ConstrainedIntegrationTabScaffold.tsx20 lines · main
| 1 | import { PropsWithChildren } from 'react' |
| 2 | import { cn } from 'ui' |
| 3 | |
| 4 | import { useIsMarketplaceEnabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext' |
| 5 | |
| 6 | interface ConstrainedIntegrationTabScaffoldProps extends PropsWithChildren { |
| 7 | className?: string |
| 8 | } |
| 9 | |
| 10 | export const ConstrainedIntegrationTabScaffold = ({ |
| 11 | children, |
| 12 | className, |
| 13 | }: ConstrainedIntegrationTabScaffoldProps) => { |
| 14 | const isMarketplace = useIsMarketplaceEnabled() |
| 15 | return ( |
| 16 | <div className={cn('w-full py-6 xl:py-10', !isMarketplace && 'px-6 xl:px-10', className)}> |
| 17 | {children} |
| 18 | </div> |
| 19 | ) |
| 20 | } |