Hello,
I’m trying out builder for our company and it looks like a good solution to our UI problems. However there are some questions about the custom components.
- If I set the component mode to
true
, I’ll loose the styles tab? Is there any way to use it and can I configure it in anyway, like define the values and units and use it with the custom components?
- If I use
withChildren
with containers and pass a component inside, first one goes fine, but the next one wraps with .builder-column
css classes and breaks the layout. Is there a way to get rid of those extra tags / css? I can circle this by moving the elements out from the column
and delete the column
component, but it’s not nice.
- How can I use responsive props or styles with custom components? If I now have a prop like
padding
with value of enum
xl and want to use different setting in mobile like m
how can I do that?
Cheers, Janne
Hi @steve,
and thanks for your swift answer
- So the editor can see it but admin can’t in custom mode? I’m currently in free mode, so I have only admin and wouldn’t like to change the roles while developing anyways. So I need to develop with all components visible then.
- Thanks! That works
- Can I adjust the breakpoints for the different sizes? Currently in our library I can define those so it would be cool to do that also in Builder.
- Can I parse the style output and define what I see there? Like colors? Prop I need to do custom plugin for that? Is the style tab anywhere in npm?
-J
Hi, thanks!
- I tried to get the data from the
theme
model, but I only get null
… what could be the problem?
export async function getStaticProps({
params,
}: GetStaticPropsContext<{ path: string[] }>) {
const page = await resolveBuilderContent('page', {
urlPath: '/' + (params?.path?.join('/') || ''),
})
const theme = await resolveBuilderContent('theme')
return {
props: {
page,
theme,
},
revalidate: 30,
}
}
...
export default function Path({
page,
theme,
...
console.log(theme) = null