@uncinc/uncinc-react-kitchen-sink 2.8.26 → 2.8.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -98,3 +98,50 @@ $material-icon-styles: (
|
|
|
98
98
|
width: 1em;
|
|
99
99
|
@include icon-color(#000000);
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/// gridIconToMaterialIcon
|
|
104
|
+
///
|
|
105
|
+
/// Mixin to overwrite old icon-implementations.
|
|
106
|
+
///
|
|
107
|
+
/// @param {String} $icon-name - name of the icon.
|
|
108
|
+
/// Needs to correspond with the file name of the icon.
|
|
109
|
+
///
|
|
110
|
+
/// @param {String} $style - Material Icon style
|
|
111
|
+
///
|
|
112
|
+
/// @param {Boolean} $custom - Are we overwwriting with a
|
|
113
|
+
/// custom icon?
|
|
114
|
+
///
|
|
115
|
+
/// @example scss
|
|
116
|
+
/// .icon-arrow {
|
|
117
|
+
/// @include gridIconToMaterialIcon('download');
|
|
118
|
+
/// }
|
|
119
|
+
///
|
|
120
|
+
/// @example scss
|
|
121
|
+
/// .icon-download {
|
|
122
|
+
/// @include gridIconToMaterialIcon($icon-name: 'custom_download', $custom: true);
|
|
123
|
+
/// }
|
|
124
|
+
///
|
|
125
|
+
@mixin gridIconToMaterialIcon(
|
|
126
|
+
$icon-name: null,
|
|
127
|
+
$style: 'outlined',
|
|
128
|
+
$custom: false,
|
|
129
|
+
) {
|
|
130
|
+
@if not $icon-name {
|
|
131
|
+
@error 'an icon name is required'
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@if not $custom {
|
|
135
|
+
background: url('~@material-design-icons/svg/#{$style}/#{$icon-name}.svg');
|
|
136
|
+
} @else {
|
|
137
|
+
background: url('#{$custom-icon-path}/#{$icon-name}.svg');
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
display: block;
|
|
141
|
+
width: 1em;
|
|
142
|
+
height: 1em;
|
|
143
|
+
background-color: transparent;
|
|
144
|
+
background-repeat: no-repeat;
|
|
145
|
+
background-position: 0 0;
|
|
146
|
+
background-size: 1em;
|
|
147
|
+
}
|