Skip to content
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

Impossible to style the <pre > element #43

Open
mehdibha opened this issue Apr 20, 2024 · 1 comment
Open

Impossible to style the <pre > element #43

mehdibha opened this issue Apr 20, 2024 · 1 comment

Comments

@mehdibha
Copy link

I wanted to reduce the padding for <pre>, this didn't work for me

<Code
     {...props}
     extensions={[
       {
         name: "pre",
         Pre: (props: BrightProps) => (
           <Code.Pre style={{ border : "5px solid red" }} className="my-32 ring-8" {...props} />
         ),
       },
     ]}
/>

Also this

<Code
     {...props}
     name: "pre",
     Pre={(props: BrightProps) => (
           <Code.Pre style={{ border : "5px solid red" }} className="my-32 ring-8" {...props} />
     )}
/>
@mehdibha
Copy link
Author

Quick walkaround for those who are stuck

<Code
      {...props}
      extensions={[
        {
          name: "pre",
          Pre: (props: BrightProps) => (
            <div className="[&>pre]:!py-1">
              <Code.Pre
                {...props}
              />
            </div>
          ),
        },
      ]}
    />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant