Skip to content

Commit 09c75ce

Browse files
committed
docs: updating the documentation on decorators and theme settings for the upcoming gardenjs v1.8
1 parent 1212888 commit 09c75ce

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/routes/(documentation)/docs/get-started/decorators/decorators.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@ For this you can define decorators.
88
Decorators are component files with one `slot`, where the component should be rendered inside. How a slot is defined depends on the ui framework.
99

1010
You can define global decorators. These are files with the file extension `das.decorator.[fwk-extension]`.
11-
If you want to use a decorator only for a specific component, you can set the decorator filename inside the component description.
11+
If you want to use a decorator only for a specific component, you can set the decorator filenames inside the component description.
12+
13+
```js
14+
export default {
15+
...
16+
decorators: ['path_to_decorator1', 'path_to_decorator2'],
17+
examples: ...
18+
}
19+
```
1220

1321
If you define more than one decorator, the decorators will be rendered recursively in the order how they are placed in the directory.
1422

15-
```
23+
```text
1624
1725
decorator1 _______________________________
1826
| |

src/routes/(documentation)/docs/get-started/settings/settings.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ During installation, the configuration file **garden.config.js** is generated in
2525
| `additional_style_files` | Path | Add global style files needed for your project, e.g. `'src/assets/scss/base.scss', 'src/assets/scss/main.scss'` |
2626
| `devices` | `small`: deviceConfig[], `medium`: deviceConfig[], `large`: deviceConfig[] | Set custom device types for each category. |
2727
| `deviceConfig`| name: String, w: Number, h: Number | Set name, width and height for a device type. |
28-
| `grid` | `size`: number, `style`: 'dotted' or 'lined', `color`: string | Custom configuration for background grid. |
2928
| `themes` | `name`: String, `stageBg`: Color, `active`: Boolean | Edit or disable "Themes" depending on whether your app uses themes. Defines a list of display modes of your project to output the components accordingly. |
29+
| `themes`: `default` | string | Settings for the default theme of the stage where the components are displayed. |
30+
| `themes`: `extended` | string | Settings for an unlimited number of additional themes for the stage where the components are displayed. Modified values override the values of the default theme. |
3031
| `themes`: `name` | String | Name of the mode as it appears in the theme navigation. E.g. `name: 'Dark mode'` |
3132
| `themes`: `stageBg` | String | Sets the background color of the stage for each mode. All common CSS color values can be used as values. E.g. `stageBg: '#101010'` |
32-
| `themes`: `active` | Boolean | Set the default theme on start: `active: 'true',`. Optionally, if it is empty, the first entry in the list is automatically used as the default. |
33+
| `themes`: `grid` | `size`: number, `style`: 'dotted' or 'lined', `color`: string | Custom configuration for background grid. |
34+
| `themes`: `color` | String | Sets the color of the distance measurement element, including the text color of the distance display. |
3335
| `themeHandler` | Function | The theme handler allows you to select project-specific themes in Gardenjs. |
3436

3537
## Pagetree

0 commit comments

Comments
 (0)