Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change page background color #66

Closed
kumarajay0412 opened this issue Sep 11, 2023 · 1 comment
Closed

change page background color #66

kumarajay0412 opened this issue Sep 11, 2023 · 1 comment

Comments

@kumarajay0412
Copy link

Suppose I have a page, I can edit its title. Is there any way I can edit and assign any custom colour to the background currently, it is white only ?

it would be great if we can add prop for page background color below title

Screenshot 2023-09-11 at 12 09 27 PM
@chrisvxd
Copy link
Member

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

@measuredco measuredco locked and limited conversation to collaborators Sep 11, 2023
@chrisvxd chrisvxd converted this issue into discussion #67 Sep 11, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants