SketchAPI
SketchAPI copied to clipboard
Update documentation and deprecation warning for Text alignment
(Thanks @konki-vienna for the report)
var text = new Text({
text: 'my text',
alignment: Text.Alignment.center,
})
throws a warning: Text.alignment is deprecated. Use Text.style.alignment instead.
The error message is a bit confusing (it means "use new Text({ style: { alignment: ... }}) instead of new Text({ alignment: ... })), so we should update both the error message and the example in the documentation: https://developer.sketch.com/reference/api/#text