updated type and function signature

This commit is contained in:
saurabhg772244 2024-09-17 12:50:20 +05:30
parent 38c6ad5ad6
commit 775a6381b4
2 changed files with 12 additions and 4 deletions

View File

@ -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

View File

@ -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