Browse Source

Start default types doc

up-style-manager
Artur Arseniev 5 years ago
parent
commit
5670c4bdc3
  1. BIN
      docs/.vuepress/public/sm-base-type.jpg
  2. BIN
      docs/.vuepress/public/sm-type-number.jpg
  3. 36
      docs/modules/Style-manager.md

BIN
docs/.vuepress/public/sm-base-type.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
docs/.vuepress/public/sm-type-number.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

36
docs/modules/Style-manager.md

@ -166,11 +166,41 @@ or you can decide to show it as a `select` and make available only a defined set
}
```
Each type defines the specific UI view and a model on how to handle inputs and updates.
Let's see below the list of all available default types with their relative UI and models.
### Default types
#### Default types
* `base` - The base type, renders as a simple input field
* `number` - Property model: PropertyNumber
* `base` - The base type, renders as a simple text input field. Model: [Property](/api/property.html)
<img :src="$withBase('/sm-base-type.jpg')"/>
```js
// Example
{
// type: 'base', // Omitting the type in definition will fallback to the 'base'
property: 'some-css-property',
label: 'Base type',
default: 'Default value',
},
```
* `number` - Number input field for numeric values. Model: [PropertyNumber](/api/property_number.html)
<img :src="$withBase('/sm-type-number.jpg')"/>
```js
// Example
{
type: 'number',
property: 'width',
label: 'Number type',
default: '0%',
units: ['px', '%'],
min: 0,
max: 100,
},
```
* `slider` -
* `select` -
* `radio` -

Loading…
Cancel
Save