@carbon/ibm-products
Version:
Carbon for IBM Products
57 lines (55 loc) • 1.94 kB
JavaScript
/**
* Copyright IBM Corp. 2020, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
//#region src/components/StringFormatter/utils/enums.js
/**
* Copyright IBM Corp. 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const deprecated_StringFormatterAlignment = {
TOP: "top",
TOP_LEFT: "top-left",
TOP_RIGHT: "top-right",
BOTTOM: "bottom",
BOTTOM_LEFT: "bottom-left",
BOTTOM_RIGHT: "bottom-right",
LEFT: "left",
LEFT_BOTTOM: "left-bottom",
LEFT_TOP: "left-top",
RIGHT: "right",
RIGHT_BOTTOM: "right-bottom",
RIGHT_TOP: "right-top"
};
const StringFormatterAlignment = {
TOP: "top",
TOP_START: "top-start",
TOP_END: "top-end",
BOTTOM: "bottom",
BOTTOM_START: "bottom-start",
BOTTOM_END: "bottom-end",
LEFT: "left",
LEFT_END: "left-end",
LEFT_START: "left-start",
RIGHT: "right",
RIGHT_END: "right-end",
RIGHT_START: "right-start"
};
const propMappingFunction = (deprecatedValue) => {
return {
[]: StringFormatterAlignment.TOP_START,
[]: StringFormatterAlignment.TOP_END,
[]: StringFormatterAlignment.BOTTOM_START,
[]: StringFormatterAlignment.BOTTOM_END,
[]: StringFormatterAlignment.LEFT_END,
[]: StringFormatterAlignment.LEFT_START,
[]: StringFormatterAlignment.RIGHT_END,
[]: StringFormatterAlignment.RIGHT_START
}[deprecatedValue];
};
//#endregion
export { StringFormatterAlignment, deprecated_StringFormatterAlignment, propMappingFunction };