Skip to content

Commit

Permalink
Merge pull request #27 from unionen/develop
Browse files Browse the repository at this point in the history
feat: add aria-hidden
  • Loading branch information
unionen authored Dec 5, 2023
2 parents f0a0de7 + dc3b83c commit f30f098
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @unionen/icons

## 1.4.0

### Minor Changes

- add aria-hidden to span

## 1.3.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unionen/icons",
"version": "1.3.0",
"version": "1.4.0",
"description": "An iconset for FormKit inputs used on unionen.se",
"private": false,
"type": "module",
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ export function singleQuotes(param: string): string {
*/
export function makeVueComponent(
param: string,
size: "sm" | "md" | "lg" | undefined = undefined
size: "sm" | "md" | "lg" | undefined = undefined,
hide: boolean = true
) {
return h("span", {
innerHTML: singleQuotes(param),
class: size ? `icon-${size}` : undefined,
"aria-hidden": hide ? "true" : undefined,
});
}

0 comments on commit f30f098

Please sign in to comment.