Newer
Older
import {Component, Prop, h} from '@stencil/core';
@Component({
tag: 'hy-site-search',
styleUrl: 'site-search.scss',
shadow: true
})
export class SiteSearch {
@Prop() isAlternative: boolean = false;
@Prop() showLabel: boolean = false;
@Prop() size: number;
@Prop() color: string;
render() {
return (
<button
aria-label={this.label}
class={{
'button--search': true,
'is-open--menu': this.isAlternative
<hy-icon icon={'hy-icon-search'} size={this.size} fill={this.color} />
{this.showLabel ? <span class={'button--search__label'}>{this.label}</span> : ''}