Skip to content

change page background color #67

Closed Answered by chrisvxd
kumarajay0412 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @kumarajay0412! You can add a new field to the root by adding a field to the root and use the render to render it.

If you're looking to add it the the body, you'll probably need to inject some styles or do some other Next.js magic.

const config = {
  root: {
    fields: {
      title: {
        type: "text",
      },
      background: {
        type: "text",
      },
    },
    render: ({ children, title, background }) => {
      return <div style={{ background }}>{children}</div>;
    },
  },
};

Moving this to discussions

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by chrisvxd
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
Converted from issue

This discussion was converted from issue #66 on September 11, 2023 10:02.