ConnectSheetStep.tsx 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { PropsWithChildren } from 'react'
  2. import { cn } from 'ui'
  3. interface ConnectSheetStepProps {
  4. number: number
  5. title: string
  6. description: string
  7. className?: string
  8. }
  9. export const ConnectSheetStep = ({
  10. number,
  11. title,
  12. description,
  13. className,
  14. children,
  15. }: PropsWithChildren<ConnectSheetStepProps>) => {
  16. return (
  17. <div
  18. className={cn('group', className)}
  19. data-connect-step
  20. data-step-title={title}
  21. data-step-description={description}
  22. >
  23. <div className="flex items-start gap-6 self-stretch">
  24. <div className="relative self-stretch shrink-0 w-6">
  25. <div className="absolute inset-0 flex items-start justify-center">
  26. <div
  27. aria-hidden="true"
  28. className={cn(
  29. 'absolute left-[calc(50%-1px)] w-px bg-border opacity-60 h-full',
  30. 'group-last:bg-transparent'
  31. )}
  32. />
  33. <div className="relative z-10 flex font-mono text-xs items-center justify-center min-w-6 w-6 h-6 border border-default rounded-md bg-surface-100 text-foreground-light">
  34. {number}
  35. </div>
  36. </div>
  37. </div>
  38. <div className="grid grid-cols-1 2xl:grid-cols-5 gap-x-6 gap-y-4 pb-12 w-full">
  39. <div className="flex flex-col 2xl:col-span-2">
  40. <p className="text-sm font-medium text-foreground">{title}</p>
  41. <p className="text-sm text-foreground-light">{description}</p>
  42. </div>
  43. <div className="2xl:col-span-3 [&_pre.code-block]:bg-surface-75!" data-step-content>
  44. {children}
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. )
  50. }