@telekom/scale-components
Version:
Scale is the digital design system for Telekom products and experiences.
35 lines (34 loc) • 1.32 kB
JavaScript
/**
* @license
* Scale https://github.com/telekom/scale
*
* Copyright (c) 2021 Egor Kirpichev and contributors, Deutsche Telekom AG
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
import { h } from '@stencil/core';
export const ActionsCell = {
defaults: {},
render: ({ content }) => {
return (h("div", { class: `tbody__actions` }, content.map((action) => {
const { label } = action, props = __rest(action, ["label"]);
if (typeof label === 'object' && '__html' in label) {
return (h("scale-button", Object.assign({ size: "small", innerHTML: label.__html }, props)));
}
return (h("scale-button", Object.assign({ size: "small" }, props), label));
})));
},
};