Merge branch 'develop' of https://github.com/mermaid-js/mermaid into 5367/architecture-diagram

This commit is contained in:
NicolasNewman
2024-07-13 22:12:52 -05:00
10 changed files with 280 additions and 352 deletions

View File

@@ -97,17 +97,21 @@
**createIcon**(`icon`, `originalSize`): [`IconResolver`](mermaid.md#iconresolver)
Converts an SVG Icon passed as a string into a properly formatted IconResolver
#### Parameters
| Name | Type |
| :------------- | :------- |
| `icon` | `string` |
| `originalSize` | `number` |
| Name | Type | Description |
| :------------- | :------- | :-------------------------------------------------------------------------- |
| `icon` | `string` | html code for the svg icon as a string (the SVG tag should not be included) |
| `originalSize` | `number` | the original size of the SVG Icon in pixels |
#### Returns
[`IconResolver`](mermaid.md#iconresolver)
IconResolver
#### Defined in
[packages/mermaid/src/rendering-util/svgRegister.ts:9](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/svgRegister.ts#L9)
[packages/mermaid/src/rendering-util/svgRegister.ts:15](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/svgRegister.ts#L15)

View File

@@ -483,8 +483,8 @@ a _[valid CSS property name](https://www.w3.org/TR/CSS/#properties)_ followed by
Here is an example of a classDef with just one property-value pair:
```
classDef movement font-style:italic;
```txt
classDef movement font-style:italic;
```
where
@@ -496,8 +496,8 @@ If you want to have more than one _property-value pair_ then you put a comma (`,
Here is an example with three property-value pairs:
```
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
```txt
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
```
where
@@ -522,7 +522,7 @@ There are two ways to apply a `classDef` style to a state:
A `class` statement tells Mermaid to apply the named classDef to one or more classes. The form is:
```txt
class [one or more state names, separated by commas] [name of a style defined with classDef]
class [one or more state names, separated by commas] [name of a style defined with classDef]
```
Here is an example applying the `badBadEvent` style to a state named `Crash`: