Skip to content

Commit

Permalink
Add docs for attributes overridden by slots (#2526)
Browse files Browse the repository at this point in the history
Currently, some attributes for the a-point, panel, quiz, tab,
tab-group and tooltip components are able to be overridden by
slots, but this is not reflected in the docs.

Let's update the docs to show this.
  • Loading branch information
luminousleek authored Apr 25, 2024
1 parent fdbe595 commit e739fbb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
8 changes: 5 additions & 3 deletions docs/userGuide/syntax/annotations.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% from "userGuide/components/advanced.md" import slot_info_trigger %}

## Annotations

**An `annotate` component allows you to easily annotate over any images.**
Expand Down Expand Up @@ -174,11 +176,11 @@ Here we showcase some use cases of the Annotate feature.
| --------- | -------- | ----------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| x | `String` | | **This must be specified.**<br>The x-coordinate of the point.<br>Supports range of values from `0%` to `100%`. |
| y | `String` | | **This must be specified.**<br>The y-coordinate of the point.<br>Supports range of values from `0%` to `100%`. |
| content | `String` | `''` | Annotate Point content.<br>The annotation content will be omitted if this is not provided. |
| header | `String` | `''` | Annotate Point header.<br>The header will be omitted if this is not provided. |
| content{{slot_info_trigger}} | `String` | `''` | Annotate Point content.<br>The annotation content will be omitted if this is not provided. |
| header{{slot_info_trigger}} | `String` | `''` | Annotate Point header.<br>The header will be omitted if this is not provided. |
| trigger | `String` | `click` | Popover trigger type.<br>Supports: `click`, `focus`, `hover`, or any space-separated combination of these. |
| placement | `String` | `top` | Position of the Popover.<br>Supports: `top`, `left`, `right`, `bottom`. |
| label | `String` | `''` | The label shown on the point itself.<br>The label will be omitted if this is not provided.<br>Note that labels should not be too long as they might overflow out of the point. |
| label{{slot_info_trigger}} | `String` | `''` | The label shown on the point itself.<br>The label will be omitted if this is not provided.<br>Note that labels should not be too long as they might overflow out of the point. |
| size | `String` | `'40'` | The size of the point in pixels. <br> Does not work with customised shapes |
| color | `String` | `'green'` | The color of the point.<br>Supports any color in the CSS color format. E.g. `red`, `#ffffff`, `rgb(66, 135, 245)`, etc. <br> Does not work with customised shapes |
| opacity | `String` | `'0.3'` | The opacity of the point.<br>Supports range of values from `0` to `1`. <br> Does not work with customised shapes |
Expand Down
2 changes: 1 addition & 1 deletion docs/userGuide/syntax/panels.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ To safeguard against unintended consequences, consider directly incorporating th
Name | Type | Default | Description
--- | --- | --- | ---
header{{slot_info_trigger}} | `String` | `''` | The clickable text on the Panel's header. Supports MarkDown text.
alt | `String` | Panel header | The clickable text on the minimised Panel. Supports MarkDown text.
alt{{slot_info_trigger}}| `String` | Panel header | The clickable text on the minimised Panel. Supports MarkDown text. When using slots, the slot name is `_alt`.
expandable | `Boolean`| `true` | Whether Panel is expandable.
expanded | `Boolean` | `false` | Whether Panel is expanded or collapsed when loaded in.
minimized | `Boolean` | `false` | Whether Panel is minimized.
Expand Down
3 changes: 1 addition & 2 deletions docs/userGuide/syntax/questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,7 @@ Simply place the `<question>` components you want to include into the `<quiz>` c
****Quiz Options and Slots****
Name | Type | Default | Description
--- | --- | --- | ---
intro | `String` | `''` | Quiz intro markup above the question count.
intro | Slot | `Click start to begin` | Quiz intro markup. Overrides the `intro` attribute if both are present.
intro{{slot_info_trigger}} | `String` | `Click start to begin` | Quiz intro markup above the question count.

<!-- Included in syntax cheat sheet -->
<div id="short" class="d-none">
Expand Down
6 changes: 4 additions & 2 deletions docs/userGuide/syntax/tabs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% from "userGuide/components/advanced.md" import slot_info_trigger %}

## Tabs

<include src="codeAndOutput.md" boilerplate >
Expand Down Expand Up @@ -39,13 +41,13 @@ active | `Number` | `0` | Active Tab index (0-based)
`tab`:
Name | Type | Default | Description
--- | --- | --- | ---
header | `String` | `null` | Tab title.
header{{slot_info_trigger}} | `String` | `null` | Tab title.
disabled | `Boolean` | `false` | Whether Tab is clickable and can be activated.

`tab-group`:
Name | Type | Default | Description
--- | --- | --- | ---
header | `String` | `null` | Tab Group title.
header{{slot_info_trigger}} | `String` | `null` | Tab Group title.
disabled | `Boolean` | `false` | Whether Tab Group is clickable and can be activated.

<box type="info">
Expand Down
4 changes: 3 additions & 1 deletion docs/userGuide/syntax/tooltips.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% from "userGuide/components/advanced.md" import slot_info_trigger %}

## Tooltips

<include src="codeAndOutput.md" boilerplate >
Expand Down Expand Up @@ -62,7 +64,7 @@ This is the same <trigger for="tt:trigger_id">trigger</trigger> as last one.
Name | Type | Default | Description
---- | ---- | ------- | ------
trigger | `String` | `hover focus` | How the tooltip is triggered.<br>Supports: `click`, `focus`, `hover`, or any space-separated combination of these.
content | `String` | `''` | Text content of the tooltip.
content{{slot_info_trigger}} | `String` | `''` | Text content of the tooltip.
placement | `String` | `top` | How to position the tooltip.<br>Supports: `top`, `left`, `right`, `bottom`.


Expand Down

0 comments on commit e739fbb

Please sign in to comment.