File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
const fs = require ( 'fs' ) ;
2
2
const feather = require ( 'feather-icons' ) ;
3
3
4
+ const capitalize = ( name ) => {
5
+ const first = name . at ( 0 ) ;
6
+ return first != undefined ? name . replace ( first , first . toUpperCase ( ) ) : name ;
7
+ } ;
8
+
4
9
const iconTemplate = icon =>
5
10
`// THIS FILE WAS GENERATED
6
11
import { component$, useContext } from "@builder.io/qwik";
@@ -22,6 +27,7 @@ export default component$((props: IconProps) => {
22
27
stroke-linecap={props.strokeLineCap ?? fallbackProps.strokeLineCap}
23
28
stroke-linejoin={props.strokeLineJoin ?? fallbackProps.strokeLineJoin}
24
29
class={\`${ icon . attrs . class } \${props.class ?? fallbackProps.class}\`}
30
+ aria-label="${ [ ...icon . name . split ( "-" ) . map ( s => capitalize ( s ) ) ] . join ( " " ) } Icon"
25
31
>${ icon . contents } </svg>
26
32
);
27
33
});
You can’t perform that action at this time.
0 commit comments