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

Remove default padding #6

Open
m4r-k0v opened this issue Oct 24, 2022 · 1 comment
Open

Remove default padding #6

m4r-k0v opened this issue Oct 24, 2022 · 1 comment

Comments

@m4r-k0v
Copy link

m4r-k0v commented Oct 24, 2022

Hey - great popover btw.

But a small suggestion can we remove default padding?
Or better yet at least add a prop to override it. Right now we can only do it using styled components or some-other lib.

Thanks

@kseniya57
Copy link
Collaborator

Hey - great popover btw.

But a small suggestion can we remove default padding? Or better yet at least add a prop to override it. Right now we can only do it using styled components or some-other lib.

Thanks

Hey! Thank you for the feedback.

In fact, you can override all the default styles by creating a wrapper and using it everywhere in your project. I believe it's better, than having a property for every style, because we have css for styling.

import React from 'react'
import Popover from '@idui/react-popover'
import styled from 'styled-components'

const CustomPopover = styled(Popover)`
  padding: 0;
  background: black;
  ...
`

or something like:

<Popover className="popover" ... />

.popover {
  padding: 0;
}

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

2 participants