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

added "block" prop toggle for the inline display type #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JanLunge
Copy link

@JanLunge JanLunge commented Nov 5, 2021

I needed to warp a full width element so to do that I need to be able to toggle the inline-block class on the wrapper,
this is done with the prop block here.

might be related to #6 (comment)

@JanLunge JanLunge changed the title added prop toggle for the inline display added "block" prop toggle for the inline display type Nov 5, 2021
@VincentVanclef
Copy link

Can we get this merged in please? Really need this lol

@valgeirb
Copy link
Owner

Can you give me an example of what problem this is solving?

@VincentVanclef
Copy link

VincentVanclef commented Nov 16, 2021

The inline-block prevents us from having full-width wrapper elements. Im currently using it to wrap around input fields to display a possible error message, but with the inline-block the input fields cannot be full-width

@nbrylevv
Copy link

nbrylevv commented Nov 18, 2021

It's better not to force any specific display style. Why not let the user do it? Also it will make easier to redefine styles.

@valgeirb
Copy link
Owner

It's better not to force any specific display style. Why not let the user do it? Also it will make easier to redefine styles.

Yeah these are good points. It's a fine line though, if I remove the inline style for example, the Popper won't be positioned correctly for most use cases and I don't want to make it frustrating for users.

This PR might be the solution.

@gabrielthomasjacobs
Copy link

One solution that might be more flexible is allowing the user to define a class name as a prop and attaching that to the div. Then the user can override the classes and styles as they need.

Primevue does this on elements that it inserts, typically allowing either a class name or inline styles to be defined as a prop.

@Kurohyou
Copy link

base popper appears to use translate3d to handle the offset distance and skid? Why not just rely on the native popper js implementation of these?

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

Successfully merging this pull request may close these issues.

6 participants