Skip to content
Discussion options

You must be logged in to vote

Hi, @linesh98
here is an example of advanced customization, with your case:

const RenderIn = ({inBuilder, inViewer}: {inBuilder: ReactNode, inViewer: ReactNode}) => {
  const {builderMode} = useFormBuilder()
  if (builderMode === 'builder') return <>{inBuilder}</>

  return <>{inViewer}</>
}

const headerStyle = {display: 'flex', width: '100%', justifyContent: 'flex-end'}

const HeaderWrapper = ({children}: PropsWithChildren) => (
  <RenderIn
    inBuilder={children}
    inViewer={<div style={headerStyle}>{children}</div>}
  />
)

const builderCustomizations: CustomizationMap = {
  JsonViewButton: {hidden: true},
  MainMenu_Button: {hidden: true},
  ResolutionSelect: {hidden: true},
  Tog…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sergeythrees
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants