Skip to content

Conversation

@aarthificial
Copy link
Contributor

@aarthificial aarthificial commented Mar 11, 2024

Adds a helper for extending nodes with default properties:

const MyTxt = withDefaults(Txt, {
  fill: '#f3303f',
});

// ...

view.add(<MyTxt>Hello, World!</MyTxt>);

@aarthificial aarthificial merged commit 6bd072a into motion-canvas:main Mar 11, 2024
@aarthificial aarthificial deleted the with-defaults branch March 11, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant