@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
54 lines • 5.41 kB
JavaScript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { SYSTEM } from '../internal/environment';
import customCssProps from '../internal/generated/custom-css-properties';
export function getTextareaStyles(style) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
let properties = {};
if ((style === null || style === void 0 ? void 0 : style.root) && SYSTEM === 'core') {
properties = {
borderRadius: (_a = style === null || style === void 0 ? void 0 : style.root) === null || _a === void 0 ? void 0 : _a.borderRadius,
borderWidth: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.borderWidth,
fontSize: (_c = style === null || style === void 0 ? void 0 : style.root) === null || _c === void 0 ? void 0 : _c.fontSize,
fontWeight: (_d = style === null || style === void 0 ? void 0 : style.root) === null || _d === void 0 ? void 0 : _d.fontWeight,
paddingBlock: (_e = style === null || style === void 0 ? void 0 : style.root) === null || _e === void 0 ? void 0 : _e.paddingBlock,
paddingInline: (_f = style === null || style === void 0 ? void 0 : style.root) === null || _f === void 0 ? void 0 : _f.paddingInline,
...(((_g = style === null || style === void 0 ? void 0 : style.root) === null || _g === void 0 ? void 0 : _g.backgroundColor) && {
[customCssProps.styleBackgroundDefault]: (_h = style.root.backgroundColor) === null || _h === void 0 ? void 0 : _h.default,
[customCssProps.styleBackgroundDisabled]: (_j = style.root.backgroundColor) === null || _j === void 0 ? void 0 : _j.disabled,
[customCssProps.styleBackgroundHover]: (_k = style.root.backgroundColor) === null || _k === void 0 ? void 0 : _k.hover,
[customCssProps.styleBackgroundFocus]: (_l = style.root.backgroundColor) === null || _l === void 0 ? void 0 : _l.focus,
[customCssProps.styleBackgroundReadonly]: (_m = style.root.backgroundColor) === null || _m === void 0 ? void 0 : _m.readonly,
}),
...(((_o = style === null || style === void 0 ? void 0 : style.root) === null || _o === void 0 ? void 0 : _o.borderColor) && {
[customCssProps.styleBorderColorDefault]: (_p = style.root.borderColor) === null || _p === void 0 ? void 0 : _p.default,
[customCssProps.styleBorderColorDisabled]: (_q = style.root.borderColor) === null || _q === void 0 ? void 0 : _q.disabled,
[customCssProps.styleBorderColorHover]: (_r = style.root.borderColor) === null || _r === void 0 ? void 0 : _r.hover,
[customCssProps.styleBorderColorFocus]: (_s = style.root.borderColor) === null || _s === void 0 ? void 0 : _s.focus,
[customCssProps.styleBorderColorReadonly]: (_t = style.root.borderColor) === null || _t === void 0 ? void 0 : _t.readonly,
}),
...(((_u = style === null || style === void 0 ? void 0 : style.root) === null || _u === void 0 ? void 0 : _u.boxShadow) && {
[customCssProps.styleBoxShadowDefault]: (_v = style.root.boxShadow) === null || _v === void 0 ? void 0 : _v.default,
[customCssProps.styleBoxShadowDisabled]: (_w = style.root.boxShadow) === null || _w === void 0 ? void 0 : _w.disabled,
[customCssProps.styleBoxShadowHover]: (_x = style.root.boxShadow) === null || _x === void 0 ? void 0 : _x.hover,
[customCssProps.styleBoxShadowFocus]: (_y = style.root.boxShadow) === null || _y === void 0 ? void 0 : _y.focus,
[customCssProps.styleBoxShadowReadonly]: (_z = style.root.boxShadow) === null || _z === void 0 ? void 0 : _z.readonly,
}),
...(((_0 = style === null || style === void 0 ? void 0 : style.root) === null || _0 === void 0 ? void 0 : _0.color) && {
[customCssProps.styleColorDefault]: (_1 = style.root.color) === null || _1 === void 0 ? void 0 : _1.default,
[customCssProps.styleColorDisabled]: (_2 = style.root.color) === null || _2 === void 0 ? void 0 : _2.disabled,
[customCssProps.styleColorHover]: (_3 = style.root.color) === null || _3 === void 0 ? void 0 : _3.hover,
[customCssProps.styleColorFocus]: (_4 = style.root.color) === null || _4 === void 0 ? void 0 : _4.focus,
[customCssProps.styleColorReadonly]: (_5 = style.root.color) === null || _5 === void 0 ? void 0 : _5.readonly,
}),
...((style === null || style === void 0 ? void 0 : style.placeholder) && {
[customCssProps.stylePlaceholderColor]: (_6 = style.placeholder) === null || _6 === void 0 ? void 0 : _6.color,
[customCssProps.stylePlaceholderFontSize]: (_7 = style.placeholder) === null || _7 === void 0 ? void 0 : _7.fontSize,
[customCssProps.stylePlaceholderFontWeight]: (_8 = style.placeholder) === null || _8 === void 0 ? void 0 : _8.fontWeight,
[customCssProps.stylePlaceholderFontStyle]: (_9 = style.placeholder) === null || _9 === void 0 ? void 0 : _9.fontStyle,
}),
};
return properties;
}
}
//# sourceMappingURL=styles.js.map