mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
updated type and function signature
This commit is contained in:
parent
38c6ad5ad6
commit
775a6381b4
@ -101,9 +101,13 @@ To add a new shape:
|
||||
- **Example**:
|
||||
|
||||
```typescript
|
||||
import { Node } from '../../types.d.ts';
|
||||
import { Node, RenderOptions } from '../../types.d.ts';
|
||||
|
||||
export const myNewShape = async (parent: SVGAElement, node: Node) => {
|
||||
export const myNewShape = async (
|
||||
parent: SVGAElement,
|
||||
node: Node,
|
||||
renderOptions: RenderOptions
|
||||
) => {
|
||||
// Create your shape here
|
||||
const shape = parent.insert('g').attr('class', 'my-new-shape');
|
||||
// Add other elements or styles as needed
|
||||
|
@ -95,9 +95,13 @@ To add a new shape:
|
||||
- **Example**:
|
||||
|
||||
```typescript
|
||||
import { Node } from '../../types.d.ts';
|
||||
import { Node, RenderOptions } from '../../types.d.ts';
|
||||
|
||||
export const myNewShape = async (parent: SVGAElement, node: Node) => {
|
||||
export const myNewShape = async (
|
||||
parent: SVGAElement,
|
||||
node: Node,
|
||||
renderOptions: RenderOptions
|
||||
) => {
|
||||
// Create your shape here
|
||||
const shape = parent.insert('g').attr('class', 'my-new-shape');
|
||||
// Add other elements or styles as needed
|
||||
|
Loading…
x
Reference in New Issue
Block a user