Skip to content

Commit

Permalink
fix: box options in all prefabs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenreijs committed Jun 26, 2020
1 parent 45442f0 commit e392328
Show file tree
Hide file tree
Showing 4 changed files with 743 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/components/box.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
? style.getColor(backgroundColor)
: getColorAlpha(
style.getColor(backgroundColor),
backgroundColorAlpha,
backgroundColorAlpha / 100,
),
backgroundImage: ({ options: { backgroundUrl } }) => {
const image = B.useText(backgroundUrl);
Expand Down
33 changes: 3 additions & 30 deletions src/prefabs/box.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,10 @@
type: 'COLOR',
},
{
value: '1',
label: 'Background color alpha',
value: 100,
label: 'Background color opacity',
key: 'backgroundColorAlpha',
type: 'CUSTOM',
configuration: {
as: 'DROPDOWN',
dataType: 'string',
allowedInput: [
{ name: '0%', value: '0' },
{ name: '5%', value: '0.05' },
{ name: '10%', value: '0.10' },
{ name: '15%', value: '0.15' },
{ name: '20%', value: '0.20' },
{ name: '25%', value: '0.25' },
{ name: '30%', value: '0.30' },
{ name: '35%', value: '0.35' },
{ name: '40%', value: '0.40' },
{ name: '45%', value: '0.45' },
{ name: '50%', value: '0.50' },
{ name: '55%', value: '0.55' },
{ name: '60%', value: '0.60' },
{ name: '65%', value: '0.65' },
{ name: '70%', value: '0.70' },
{ name: '75%', value: '0.75' },
{ name: '80%', value: '0.80' },
{ name: '85%', value: '0.85' },
{ name: '90%', value: '0.90' },
{ name: '95%', value: '0.95' },
{ name: '100%', value: '1' },
],
},
type: 'NUMBER',
},
{
value: false,
Expand Down
Loading

0 comments on commit e392328

Please sign in to comment.