chore(examples): migrates form-builder example to 3.0 (#9681)
### What? Migrates the `form-builder` example to payload `3.0`. `Updates`: - Now has a next app directly along side payload. - Removes `form-builder/next-app` & `form-builder/next-pages` example front-ends and only uses new recommended approach (i.e admin panel & front-end on the same port - `3000`)
This commit is contained in:
30
examples/form-builder/src/components/Gutter/index.tsx
Normal file
30
examples/form-builder/src/components/Gutter/index.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import type { Ref } from 'react'
|
||||
|
||||
import React, { forwardRef } from 'react'
|
||||
|
||||
import classes from './index.module.scss'
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode
|
||||
className?: string
|
||||
left?: boolean
|
||||
ref?: Ref<HTMLDivElement>
|
||||
right?: boolean
|
||||
}
|
||||
|
||||
export const Gutter: React.FC<Props> = forwardRef<HTMLDivElement, Props>((props, ref) => {
|
||||
const { children, className, left = true, right = true } = props
|
||||
|
||||
return (
|
||||
<div
|
||||
className={[left && classes.gutterLeft, right && classes.gutterRight, className]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
ref={ref}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
})
|
||||
|
||||
Gutter.displayName = 'Gutter'
|
||||
Reference in New Issue
Block a user