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

Arbitrary props or styles for structural components #738

Open
robcostello1 opened this issue Sep 10, 2024 · 2 comments
Open

Arbitrary props or styles for structural components #738

robcostello1 opened this issue Sep 10, 2024 · 2 comments

Comments

@robcostello1
Copy link

In our designs, our sections are divided by graphics like the following:

Screenshot 2024-09-10 at 10 20 14

In case that's difficult to see there's a sweeping graphic at the transition point between the two background colours.

We could define our own sections but then there would be two sections and our content editors would have to nest sections within sections, which is confusing.

Ideally we'd like to be able to use our own section component in place of the existing structural component, or to be able to configure the structural component how we see fit. Maybe it would be possible to configure a "variant" variable (or any arbitrary variables) to apply these styles, through the options argument in defineComponents.

And/or the ability to pass in our own replacement components (based on a strict schema) as an option?

@primeinteger
Copy link
Contributor

Hey @robcostello1, my apologies for the delayed response.

Where the sweeping graphics merges the two sections together, would it be possible to add a small section there that contains only the bottom slice of the sweeping graphic as an image? Something like this is what I have in mind to help illustrate:

365980660-e09137da-18f4-44d2-b4bc-aa94255ab69f

If the sweeping graphic was a PNG of just the white curved portion and the rest of the PNG was transparent (where the squiggly line is), then you could fill in the gray area with Background Color. Would something like that work for you here?

It might also be something that could be saved as a Pattern to make it easier to reuse on multiple Experiences.

Let me know what you think. Thanks!

@elylucas
Copy link
Member

@robcostello1 to add another idea on top of the one above, could you have one top level section and add all your components into that one?

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

3 participants