(icon)
| 13251 | |
| 13252 | var styles$2 = namespace.styles; |
| 13253 | function asFoundIcon(icon) { |
| 13254 | var width = icon[0]; |
| 13255 | var height = icon[1]; |
| 13256 | |
| 13257 | var _icon$slice = icon.slice(4), |
| 13258 | _icon$slice2 = _slicedToArray(_icon$slice, 1), |
| 13259 | vectorData = _icon$slice2[0]; |
| 13260 | |
| 13261 | var element = null; |
| 13262 | |
| 13263 | if (Array.isArray(vectorData)) { |
| 13264 | element = { |
| 13265 | tag: "g", |
| 13266 | attributes: { |
| 13267 | class: "" |
| 13268 | .concat(config.familyPrefix, "-") |
| 13269 | .concat(DUOTONE_CLASSES.GROUP), |
| 13270 | }, |
| 13271 | children: [ |
| 13272 | { |
| 13273 | tag: "path", |
| 13274 | attributes: { |
| 13275 | class: "" |
| 13276 | .concat(config.familyPrefix, "-") |
| 13277 | .concat(DUOTONE_CLASSES.SECONDARY), |
| 13278 | fill: "currentColor", |
| 13279 | d: vectorData[0], |
| 13280 | }, |
| 13281 | }, |
| 13282 | { |
| 13283 | tag: "path", |
| 13284 | attributes: { |
| 13285 | class: "" |
| 13286 | .concat(config.familyPrefix, "-") |
| 13287 | .concat(DUOTONE_CLASSES.PRIMARY), |
| 13288 | fill: "currentColor", |
| 13289 | d: vectorData[1], |
| 13290 | }, |
| 13291 | }, |
| 13292 | ], |
| 13293 | }; |
| 13294 | } else { |
| 13295 | element = { |
| 13296 | tag: "path", |
| 13297 | attributes: { |
| 13298 | fill: "currentColor", |
| 13299 | d: vectorData, |
| 13300 | }, |
| 13301 | }; |
| 13302 | } |
| 13303 | |
| 13304 | return { |
| 13305 | found: true, |
| 13306 | width: width, |
| 13307 | height: height, |
| 13308 | icon: element, |
| 13309 | }; |
| 13310 | } |
no test coverage detected