Skip to content

Commit

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

fix(PAGE-4710): Background image of box are now shown
  • Loading branch information
ingmar-stipriaan authored Oct 3, 2024
2 parents e557f6f + 8335101 commit f6273d1
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 @@ -976,6 +976,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 @@ -294,6 +294,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 @@ -662,6 +662,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 f6273d1

Please sign in to comment.