5353/// @param {String|null} $feature
5454///
5555/// @example features('components', 'card', 'horizontal')
56- /// @example features('elements', 'button', 'gradient ')
56+ /// @example features('elements', 'button', 'preloader ')
5757///
5858/// @return bool
5959///
7272/// @param {String} $node
7373/// @param {String} $module
7474///
75+ /// @example enabled('elements', 'grid')
76+ /// @example enabled('components', 'navbar')
77+ ///
7578/// @return bool
7679///
7780@function enabled ($node , $module : null )
101104 @warn helper .$nesting-depth ;
102105 }
103106
104- @if theme ($module , nth ($keys , 1 ), nth ($keys , 2 )) {
105- $value : theme ($module , nth ($keys , 1 ), nth ($keys , 2 ));
106-
107- @if length ($keys ) > 2 {
108- $value : theme ($module , nth ($keys , 1 ), nth ($keys , 2 ), nth ($keys , 3 ));
107+ $value : theme ($module , $keys ... );
109108
110- @if length ($keys ) > 3 {
111- $value : theme ($module , nth ($keys , 1 ), nth ($keys , 2 ), nth ($keys , 3 ), nth ($keys , 4 ));
112- }
113- }
114-
115- @if ($value != null) {
116- @return $value ;
117- }
109+ @if ($value != null) {
110+ @return $value ;
118111 }
119112
120113 @return get_default_settings ($keys );
130123///
131124@function get_default_settings ($keys )
132125{
133- $value : get .settings (nth ($keys , 1 ), nth ($keys , 2 ));
134-
135- @if length ($keys ) > 2 {
136- $value : get .settings (nth ($keys , 1 ), nth ($keys , 2 ), nth ($keys , 3 ));
137-
138- @if length ($keys ) > 3 {
139- $value : get .settings (nth ($keys , 1 ), nth ($keys , 2 ), nth ($keys , 3 ), nth ($keys , 4 ));
140- }
141- }
142-
143- @return $value ;
126+ @return get .settings ($keys ... );
144127}
0 commit comments