UNPKG

stackexchange-api

Version:
19 lines (18 loc) 1.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * The equivalent of [Type styling](https://api.stackexchange.com/docs/types/styling).<br> * This object represents some Stylings of a [[Site]] in the [Stack Exchange network](https://stackexchange.com/sites).<br> * These Stylings are meant to allow developers to subtly vary the presentation of resources in their applications so as to indicate to users the original source site.<br> * Applications should be able to gracefully handle these styles changes, though they can safely assume that these style changes are infrequent.<br> * Note that colors can be returned either as six or three digit hex triplets. */ class Styling { constructor(styling) { var _a, _b, _c, _d, _e, _f; this.linkColor = (_b = (_a = styling) === null || _a === void 0 ? void 0 : _a.link_color, (_b !== null && _b !== void 0 ? _b : null)); this.tagBackgroundColor = (_d = (_c = styling) === null || _c === void 0 ? void 0 : _c.tag_background_color, (_d !== null && _d !== void 0 ? _d : null)); this.tagForegroundColor = (_f = (_e = styling) === null || _e === void 0 ? void 0 : _e.tag_foreground_color, (_f !== null && _f !== void 0 ? _f : null)); } } exports.Styling = Styling;