forked from web-padawan/aybolit
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cxl-ui): add
cxl-search-header-item
component
- Loading branch information
1 parent
6e78329
commit 2ca0930
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
:host { | ||
font-weight: 400; | ||
|
||
vaadin-button { | ||
background-color: transparent; | ||
border-radius: var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0 0 ; | ||
margin-bottom: 0; | ||
|
||
&::part(label) { | ||
color: var(--lumo-shade); | ||
} | ||
} | ||
|
||
.label { | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
:host(.checked) { | ||
color: var(--lumo-contrast); | ||
|
||
vaadin-button, vaadin-button { | ||
background-color: var(--lumo-primary-color); | ||
|
||
&::part(label) { | ||
color: var(--lumo-base-color); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
import { LitElement, html } from 'lit'; | ||
import { customElement, property } from 'lit/decorators.js'; | ||
import '@vaadin/button'; | ||
import cxlFilterHeaderItemStyles from '../styles/cxl-filter-header-item-css.js'; | ||
|
||
@customElement('cxl-filter-header-item') | ||
export class CXLFilterHeaderItemElement extends LitElement { | ||
static get styles() { | ||
return [cxlFilterHeaderItemStyles]; | ||
} | ||
|
||
@property({ type: String }) label = ''; | ||
@property({ type: String }) value = ''; | ||
|
||
@property({ type: Number }) count = 0; | ||
|
||
@property({ type: Boolean, reflect: true }) checked = false; | ||
|
||
render () { | ||
return html` | ||
<vaadin-button> | ||
<span class="label">${this.label}</span> | ||
<span class="count">(${this.count})</span> | ||
</vaadin-button> | ||
` | ||
} | ||
} |