mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 10:48:44 +00:00
Org files (#1183)
* Organize files * Import EventsMixin * Import NavigateMixin * Dissolve window.hassMixins * Apply ElementMixin when we use it * Update tests to point at right dir * Eslint * Clean * Update mixins inside hassio * Update lint command" * Fix polymer lint
This commit is contained in:
11
src/common/entity/input_dateteime_icon.js
Normal file
11
src/common/entity/input_dateteime_icon.js
Normal file
@@ -0,0 +1,11 @@
|
||||
/** Return an icon representing an input datetime state. */
|
||||
import domainIcon from './domain_icon.js';
|
||||
|
||||
export default function inputDateTimeIcon(state) {
|
||||
if (!state.attributes.has_date) {
|
||||
return 'mdi:clock';
|
||||
} else if (!state.attributes.has_time) {
|
||||
return 'mdi:calendar';
|
||||
}
|
||||
return domainIcon('input_datetime');
|
||||
}
|
||||
Reference in New Issue
Block a user