✨ Add aksel-icons package (@navikt/aksel-icons)

Four hand-written React icon wrappers (Information, Checkmark, Warning,
XMark) with the source SVGs kept under svg/ for reference.
This commit is contained in:
Aksel Mini committed 2026-08-12 14:20:00 +02:00
1 parent 559fd2b971
commit 1bcf7f5d53
11 files changed
+162

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
{
"name": "@navikt/aksel-icons",
"version": "0.1.0",
"description": "SVG icons as React components for Aksel Mini",
"license": "MIT",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsc -p tsconfig.json",
"clean": "rm -rf dist"
},
"peerDependencies": {
"react": "^18.0.0"
},
"devDependencies": {
"@types/react": "18.3.11",
"react": "18.3.1",
"typescript": "5.5.4"
}
}
+27
View File
@@ -0,0 +1,27 @@
import { forwardRef } from "react";
import type { SVGProps } from "react";
export const CheckmarkIcon = forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>(
function CheckmarkIcon(props, ref) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="none"
focusable={false}
aria-hidden
ref={ref}
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M9.55 17.05 4.5 12l1.4-1.4 3.65 3.64L18.1 5.7l1.4 1.4-9.95 9.95Z"
fill="currentColor"
/>
</svg>
);
},
);
@@ -0,0 +1,27 @@
import { forwardRef } from "react";
import type { SVGProps } from "react";
export const InformationIcon = forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>(
function InformationIcon(props, ref) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="none"
focusable={false}
aria-hidden
ref={ref}
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm.75 6.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm.75 10.5h-3v-1.5h.75V11h-.75V9.5h2.25v7.25h.75v1.5Z"
fill="currentColor"
/>
</svg>
);
},
);
+27
View File
@@ -0,0 +1,27 @@
import { forwardRef } from "react";
import type { SVGProps } from "react";
export const WarningIcon = forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>(
function WarningIcon(props, ref) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="none"
focusable={false}
aria-hidden
ref={ref}
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M12 2 1 21h22L12 2Zm-.75 7h1.5v5.5h-1.5V9Zm.75 8.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
fill="currentColor"
/>
</svg>
);
},
);
+27
View File
@@ -0,0 +1,27 @@
import { forwardRef } from "react";
import type { SVGProps } from "react";
export const XMarkIcon = forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>(
function XMarkIcon(props, ref) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="none"
focusable={false}
aria-hidden
ref={ref}
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M6.4 5 12 10.6 17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4L12 13.4 6.4 19 5 17.6 10.6 12 5 6.4 6.4 5Z"
fill="currentColor"
/>
</svg>
);
},
);
+4
View File
@@ -0,0 +1,4 @@
export { InformationIcon } from "./InformationIcon";
export { CheckmarkIcon } from "./CheckmarkIcon";
export { WarningIcon } from "./WarningIcon";
export { XMarkIcon } from "./XMarkIcon";
+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.55 17.05 4.5 12l1.4-1.4 3.65 3.64L18.1 5.7l1.4 1.4-9.95 9.95Z" fill="#23262A"/>
</svg>

After

Width:  |  Height:  |  Size: 237 B

+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm.75 6.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm.75 10.5h-3v-1.5h.75V11h-.75V9.5h2.25v7.25h.75v1.5Z" fill="#23262A"/>
</svg>

After

Width:  |  Height:  |  Size: 313 B

+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2 1 21h22L12 2Zm-.75 7h1.5v5.5h-1.5V9Zm.75 8.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" fill="#23262A"/>
</svg>

After

Width:  |  Height:  |  Size: 252 B

+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.4 5 12 10.6 17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4L12 13.4 6.4 19 5 17.6 10.6 12 5 6.4 6.4 5Z" fill="#23262A"/>
</svg>

After

Width:  |  Height:  |  Size: 268 B

+8
View File
@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}