MCPcopy Create free account
hub / github.com/api-platform/website / ShapeSection

Function ShapeSection

pwa/components/common/ShapeSection.tsx:30–50  ·  view source on GitHub ↗
({
  effect = "right-triangle",
  maskColor = "white",
  darkModeColor,
  className,
  children,
}: ShapeSectionProps)

Source from the content-addressed store, hash-verified

28]; // KEEP FOR TAILWIND PURGE
29
30export default function ShapeSection({
31 effect = "right-triangle",
32 maskColor = "white",
33 darkModeColor,
34 className,
35 children,
36}: ShapeSectionProps) {
37 const shapeClassName = classNames(
38 `after:h-20 after:absolute after:-bottom-px after:left-0 after:w-full after:bg-${maskColor}`,
39 effect === "right-triangle" && "after:clip-path-corner-right",
40 effect === "left-triangle" && "after:clip-path-corner-left",
41 effect === "center-triangle" && "after:clip-path-triangle-bottom",
42 darkModeColor && `dark:after:bg-${darkModeColor}`
43 );
44
45 return (
46 <div className={classNames("relative w-full", className, shapeClassName)}>
47 {children}
48 </div>
49 );
50}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected