So after reading over the docs and then taking a umedy class on Stencil I still cannot seem to get class names to set on my object. for example i have the following
import { Component, h, Prop } from '@stencil/core'
@Component({
tag: 'my-button',
styleUrl: 'my-button.css'
})
export class MyButton {
@Prop() btext: string;
@Prop() btype: string;
render(){
let classNaming: string = '';
switch(this.btype) {
case "Primary":
classNaming += 'My-Button-CSS';
break;
case "Secondary"
classNaming += 'My-Button-CSS';
break;
}
return <button class={classNaming}>this.btext</button>
}
}
}
The issue is the class never shows up on the button. I know in react-bootstrap i saw in a tutorial, but never used react, they have variant="" which is basically what i am wanting to build and having no luck getting this working as Stencil tutorials and advanced items are sparse. The other issue is the classes that are out there are all based on 1.8.