MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / Section

Function Section

web/src/components/ui/section.tsx:30–77  ·  view source on GitHub ↗
({
  children,
  className,
  containerClassName,
  background,
  contained = true,
  hero = false,
  fullViewport = false,
  animate = true,
  style: customStyle,
  ...props
}: SectionProps)

Source from the content-addressed store, hash-verified

28}
29
30export function Section({
31 children,
32 className,
33 containerClassName,
34 background,
35 contained = true,
36 hero = false,
37 fullViewport = false,
38 animate = true,
39 style: customStyle,
40 ...props
41}: SectionProps) {
42 const style = {
43 backgroundColor: background,
44 ...customStyle,
45 }
46 const isMobile = useIsMobile()
47
48 const content = contained ? (
49 <div className={cn('codebuff-container relative z-10', containerClassName)}>
50 {children}
51 </div>
52 ) : (
53 children
54 )
55
56 return (
57 <motion.section
58 className={cn('relative', className)}
59 initial={false}
60 animate={{
61 minHeight: fullViewport ? '95dvh' : 'auto',
62 }}
63 transition={{
64 duration: 1,
65 ease: [0.32, 0.72, 0, 1],
66 }}
67 style={{
68 ...style,
69 paddingTop: hero ? '1rem' : '10rem',
70 paddingBottom: isMobile && hero ? '5rem' : '10rem',
71 }}
72 {...props}
73 >
74 {content}
75 </motion.section>
76 )
77}

Callers

nothing calls this directly

Calls 2

useIsMobileFunction · 0.90
cnFunction · 0.90

Tested by

no test coverage detected