UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

47 lines (46 loc) 1.36 kB
/** * DevExtreme (esm/renovation/ui/scheduler/appointment/overflow_indicator/utils.js) * Version: 21.2.4 * Build date: Mon Dec 06 2021 * * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { addToStyles } from "../../workspaces/utils"; export var getOverflowIndicatorStyles = viewModel => { var { color: color, geometry: { height: height, left: left, top: top, width: width } } = viewModel; var result = addToStyles([{ attr: "left", value: "".concat(left, "px") }, { attr: "top", value: "".concat(top, "px") }, { attr: "width", value: "".concat(width, "px") }, { attr: "height", value: "".concat(height, "px") }]); if (color) { result = addToStyles([{ attr: "backgroundColor", value: color }, { attr: "boxShadow", value: "inset ".concat(width, "px 0 0 0 rgba(0, 0, 0, 0.3)") }], result) } return result }; export var getOverflowIndicatorColor = (color, colors) => !colors.length || 0 === colors.filter(item => item !== color).length ? color : void 0;