mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-27 20:46:38 +00:00
12 lines
330 B
JavaScript
12 lines
330 B
JavaScript
/** 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');
|
|
}
|