docs(cheatsheet): Document SVG idiosyncrasies (#6055)
This commit is contained in:
parent
6e62217b78
commit
a88b887a05
|
@ -78,3 +78,17 @@ syntax:
|
||||||
`<p>Employer: {{employer?.companyName}}</p>`|`{{employer?.companyName}}`
|
`<p>Employer: {{employer?.companyName}}</p>`|`{{employer?.companyName}}`
|
||||||
description:
|
description:
|
||||||
The safe navigation operator (`?`) means that the `employer` field is optional and if `undefined`, the rest of the expression should be ignored.
|
The safe navigation operator (`?`) means that the `employer` field is optional and if `undefined`, the rest of the expression should be ignored.
|
||||||
|
|
||||||
|
@cheatsheetItem
|
||||||
|
syntax:
|
||||||
|
`<svg:rect x="0" y="0" width="100" height="100"/>`|`svg:`
|
||||||
|
description:
|
||||||
|
SVG snippet templates need an `svg:` prefix on their root element to disambiguate the SVG element from an HTML component.
|
||||||
|
|
||||||
|
@cheatsheetItem
|
||||||
|
syntax:
|
||||||
|
`<svg>
|
||||||
|
<rect x="0" y="0" width="100" height="100"/>
|
||||||
|
</svg>`|`svg`
|
||||||
|
description:
|
||||||
|
`<svg>` root elements are detected as SVG element automatically without the prefix
|
||||||
|
|
Loading…
Reference in New Issue