-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Description
When a rhelement is upgraded, it should add an attribute to itself signifying what type of component it is, for example:
- container
- content
- combo
Also, add a question to the generator to pick the type.
@castastrophe @starryeyez024 @kylebuch8 could you all review that this all makes sense? I came in halfway into the discussion and could easily have missed some things.
Brainstorm impl:
rh-card.js
class RhCard extends Rhelement {
get type() {
return Rhelement.Types.Container;
}
}Rhelement base class adding the attribute:
rhelement.js
class Rhelement extends HTMLElement {
static get Types() {
return {
Container: "container",
Content: "content",
Combo: "combo",
};
}
connectedCallback() {
this.setAttribute("type", this.type);
}
}castastrophe
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request