@carbon/ibm-security
Version:
Carbon for Cloud & Cognitive IBM Security UI components
33 lines (29 loc) • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getComponentNamespace = exports.carbonPrefix = exports.appendComponentNamespace = void 0;
var _carbonComponents = require("carbon-components");
/**
* @file Namespace.
* @copyright IBM Security 2018 - 2021
*/
var carbonPrefix = exports.carbonPrefix = _carbonComponents.settings.prefix;
var namespace = 'security--';
/**
* Appends the namespace for a component to another namespace.
* @param {string} componentNamespace The component namespace to append to.
* @param {string} componentName The component namespace to append.
* @returns {string} The appended component namespace to return.
*/
var appendComponentNamespace = exports.appendComponentNamespace = function appendComponentNamespace(componentNamespace, componentName) {
return "".concat(componentNamespace, "__").concat(componentName);
};
/**
* Creates the namespace for a component using the global namespace.
* @param {string} componentName The component namespace to create.
* @returns {string} The component namespace to return.
*/
var getComponentNamespace = exports.getComponentNamespace = function getComponentNamespace(componentName) {
return "".concat(namespace).concat(componentName);
};