Skip to content

Commit

Permalink
compeont: allow to set the id
Browse files Browse the repository at this point in the history
  • Loading branch information
lucsoft committed Feb 19, 2022
1 parent f2580dc commit 90bf8e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export abstract class Component {
this.wrapper.style.margin = size;
return this;
}
setId(id: string) {
this.wrapper.id = id;
return this;
}
draw() {
return this.wrapper;
}
Expand Down

0 comments on commit 90bf8e0

Please sign in to comment.