fix: theme types (#6423)

* chore: fix theme types

* chore: format
This commit is contained in:
Beka Westberg
2022-09-26 12:52:46 -07:00
committed by GitHub
parent f2e408b6fa
commit abad51fdb0
8 changed files with 78 additions and 38 deletions

View File

@@ -137,6 +137,10 @@ export class PathObject implements IPathObject {
* @internal
*/
applyColour(block: BlockSvg) {
if (!this.style.colourTertiary) {
throw new Error(
'The renderer did not properly initialize the block style');
}
this.svgPath.setAttribute('stroke', this.style.colourTertiary);
this.svgPath.setAttribute('fill', this.style.colourPrimary);
@@ -195,6 +199,10 @@ export class PathObject implements IPathObject {
*/
protected updateShadow_(shadow: boolean) {
if (shadow) {
if (!this.style.colourSecondary) {
throw new Error(
'The renderer did not properly initialize the block style');
}
this.svgPath.setAttribute('stroke', 'none');
this.svgPath.setAttribute('fill', this.style.colourSecondary);
}