Skip to content

Commit

Permalink
fix: refactor makeVueComponent method
Browse files Browse the repository at this point in the history
  • Loading branch information
lasseitorp committed Sep 12, 2024
1 parent b719b91 commit e67aee6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @unionen/icons

## 1.5.0

### Minor Changes

- refactor makeVueComponent method

## 1.4.11

### Minor Changes
Expand Down Expand Up @@ -192,4 +198,3 @@

- added conventional commits
- 8699734: Initial commit

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unionen/icons",
"version": "1.4.11",
"version": "1.5.0",
"description": "An iconset for FormKit inputs used on unionen.se",
"private": false,
"type": "module",
Expand Down Expand Up @@ -72,4 +72,3 @@
"vue": "^3.3.10"
}
}

4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export function singleQuotes(param: string): string {
*/
export function makeVueComponent(
param: string | undefined,
size: "sm" | "md" | "lg" | undefined = undefined,
size: "sm" | "md" | "lg" | "none" = "sm",
hide: boolean = true
) {
return h("span", {
innerHTML: param ? singleQuotes(param) : undefined,
class: size ? `icon-${size}` : undefined,
class: size !== "none" ? `icon-${size}` : undefined,
"aria-hidden": hide ? "true" : undefined,
});
}
Expand Down

0 comments on commit e67aee6

Please sign in to comment.