UNPKG

627 BSCSSView Raw
1//
2// Copyright IBM Corp. 2016, 2018
3//
4// This source code is licensed under the Apache-2.0 license found in the
5// LICENSE file in the root directory of this source tree.
6//
7
8@import 'feature-flags';
9
10/// Used for enabling features
11/// @access public
12/// @param {String} $feature - feature from $default-feature-flags
13/// @example @if feature-flag-enabled('components-x') { ... } will include code inside of { } only if components-x is true
14@function feature-flag-enabled($feature) {
15 @if global-variable-exists(feature-flags) == true and map-get($feature-flags, $feature) == true {
16 @return true;
17 }
18 @return false;
19}