Skip to content

Commit

Permalink
docs: updated graphics and map style section with extraStyle[build doc]
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed May 6, 2024
1 parent 57f6909 commit 1e2fc81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions docs/api/core/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,10 @@ Under the hood it relies on the [createShape](https://github.com/kalisio/kdk/blo
color: 'black', // any HTML color or [Quasar color](https://quasar.dev/style/color-palette/)
size: '12px', // any HTML size
translation: ['-50%', '-50%'], // translation to apply to render the text relative to the shape
rotation: 0 // rotation to apply to render the text relative to the shape
rotation: 0, // rotation to apply to render the text relative to the shape
extraStyle: 'background-color: #1A1A1A' // additional CSS to be applied to text
},
extraStyle: 'transform: translate(50%, 0%)', // additional CSS to be applied to the whole element (ie shape, icon and text)
html: null // an HTML element to be rendered
}
```
Expand All @@ -356,7 +358,8 @@ Shapes['my-shape'] = {
translation: // the default translation to apply to render the text. Default value is ['-50%', '-50%'] (optional)
},
anchor: 'bottom-center', // the anchor of the shape. Default value is `center-center` (optional)
radiusToSize: (r) => { return ... } // a function to compute the size according a radius. Default function returns the double of the radius (optional)
radiusToSize: (r) => { return ... }, // a function to compute the size according a radius. Default function returns the double of the radius (optional)
extraStyle: 'background-color: #1A1A1A', // additional CSS to be applied to the shape (optional)
},
```
Expand Down
3 changes: 2 additions & 1 deletion docs/api/map/map-mixins.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ style: {
color: 'black', // any HTML color or [Quasar color](https://quasar.dev/style/color-palette/)
size: '12px', // any HTML size
translation: ['-50%', '-50%'], // translation to apply to render the text relative to the shape
rotation: 0 // rotation to apply to render the text relative to the shape
rotation: 0, // rotation to apply to render the text relative to the shape
extraStyle: 'background-color: #1A1A1A' // additional CSS to be applied to text
},
html: null // an HTML element to be rendered
}
Expand Down

0 comments on commit 1e2fc81

Please sign in to comment.