Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fill type to accept CanvasGradient #1772

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

squoddam
Copy link
Contributor

@squoddam squoddam commented Jun 3, 2024

Currently fill property, defined in ShapeConfig, only allows for strings to be passed.
But despite that it is actually possible to pass CanvasGradient to the fill, and it renders correctly (codesandbox demo)

This PR adds CanvasGradient as one of possible values of fill, the same way it is done for stroke:

stroke?: string | CanvasGradient;

@lavrton
Copy link
Member

lavrton commented Jun 3, 2024

Good. Can you also update the shape.fill() method type?

@lavrton lavrton merged commit cb0cbbf into konvajs:master Jun 4, 2024
2 checks passed
@lavrton
Copy link
Member

lavrton commented Jun 4, 2024

Thanks. I will make a release a bit later.

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.

2 participants