Skip to content

Commit

Permalink
Merge pull request #3483 from bettyblocks/fix/box-with-bg-image-not-s…
Browse files Browse the repository at this point in the history
…howing-PAGE-4710

Fix/box with bg image not showing page 4710
  • Loading branch information
stefan-betty authored Oct 1, 2024
2 parents d2295af + aa0a6a8 commit fbf8239
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/prefabs/pageWithErrors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,14 @@ const beforeCreate = ({
value: ['0rem', '0rem', 'M', '0rem'],
}),
);
setOption(
backgroundBox,
'backgroundType',
(opt: PrefabComponentOption) => ({
...opt,
value: 'url',
}),
);
setOption(
backgroundBox,
'backgroundUrl',
Expand Down
12 changes: 12 additions & 0 deletions src/prefabs/pageWithHomepageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,18 @@ export default makePrefab('Homepage, inspirational', attrs, beforeCreate, [
'https://assets.bettyblocks.com/63b1c6ccc6874e0796e5cc5b7e41b3da_assets/files/Homepage_banner_gradient',
],
}),
backgroundType: option('CUSTOM', {
label: 'Background type',
value: 'url',
configuration: {
as: 'BUTTONGROUP',
dataType: 'string',
allowedInput: [
{ name: 'Image', value: 'img' },
{ name: 'Data/URL', value: 'url' },
],
},
}),
},
},
[
Expand Down
12 changes: 12 additions & 0 deletions src/prefabs/pageWithLoginAndRegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,18 @@ export default makePrefab(
},
},
),
backgroundType: option('CUSTOM', {
label: 'Background type',
value: 'url',
configuration: {
as: 'BUTTONGROUP',
dataType: 'string',
allowedInput: [
{ name: 'Image', value: 'img' },
{ name: 'Data/URL', value: 'url' },
],
},
}),
backgroundUrl: variable('Background url', {
value: [
'https://assets.bettyblocks.com/7730f33d3a624ec6b5383b5dc26c79d6_assets/files/login-background.jpeg',
Expand Down
12 changes: 12 additions & 0 deletions src/prefabs/pageWithLoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,18 @@ const prefabStructure: PrefabComponent[] = [
backgroundOptions: toggle('Show background options', {
value: true,
}),
backgroundType: option('CUSTOM', {
label: 'Background type',
value: 'url',
configuration: {
as: 'BUTTONGROUP',
dataType: 'string',
allowedInput: [
{ name: 'Image', value: 'img' },
{ name: 'Data/URL', value: 'url' },
],
},
}),
backgroundUrl: variable('Background url', {
value: [
'https://assets.bettyblocks.com/1e9019bb1c5c4af2ba799c2ee1761af0_assets/files/login-background',
Expand Down
12 changes: 12 additions & 0 deletions src/prefabs/pageWithRegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,18 @@ export default makePrefab('User, account register only', attrs, beforeCreate, [
as: 'UNIT',
},
}),
backgroundType: option('CUSTOM', {
label: 'Background type',
value: 'url',
configuration: {
as: 'BUTTONGROUP',
dataType: 'string',
allowedInput: [
{ name: 'Image', value: 'img' },
{ name: 'Data/URL', value: 'url' },
],
},
}),
backgroundOptions: toggle('Show background options', {
value: true,
}),
Expand Down

0 comments on commit fbf8239

Please sign in to comment.