Browse Source

Add builtin opacity

up-style-manager
Artur Arseniev 4 years ago
parent
commit
66ae1b1041
  1. 4
      src/style_manager/config/config.js
  2. 4
      src/style_manager/model/PropertyFactory.js

4
src/style_manager/config/config.js

@ -44,12 +44,12 @@ export default {
{
name: 'Decorations',
open: false,
properties: ['border-radius-c', 'background-color', 'border-radius', 'border', 'box-shadow', 'background'],
properties: ['background-color', 'border-radius', 'border', 'box-shadow', 'background'],
},
{
name: 'Extra',
open: false,
properties: ['transition', 'perspective', 'transform'],
properties: ['opacity', 'transition'],
},
],

4
src/style_manager/model/PropertyFactory.js

@ -9,6 +9,7 @@ export default class PropertyFactory {
this.typeRadio = 'radio';
this.typeSelect = 'select';
this.typeFile = 'file';
this.typeSlider = 'slider';
this.typeComposite = 'composite';
this.typeStack = 'stack';
this.unitsSize = ['px', '%', 'em', 'rem', 'vh', 'vw'];
@ -203,6 +204,9 @@ export default class PropertyFactory {
// File type
['background-image', { type: this.typeFile, functionName: 'url', default: 'none' }],
// Slider type
['opacity', { type: this.typeSlider, default: '1', min: 0, max: 1, step: 0.01 }],
// Select types
['display', { type: this.typeSelect, default: 'block', options: this.opstDisplay }],
['flex-direction', { default: 'row', options: this.optsDir, requires: requireFlex }, 'display'],

Loading…
Cancel
Save