diff --git a/packages/core/icons/package.json b/packages/core/icons/package.json new file mode 100644 index 0000000..b58130d --- /dev/null +++ b/packages/core/icons/package.json @@ -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" + } +} diff --git a/packages/core/icons/src/CheckmarkIcon.tsx b/packages/core/icons/src/CheckmarkIcon.tsx new file mode 100644 index 0000000..57e6170 --- /dev/null +++ b/packages/core/icons/src/CheckmarkIcon.tsx @@ -0,0 +1,27 @@ +import { forwardRef } from "react"; +import type { SVGProps } from "react"; + +export const CheckmarkIcon = forwardRef>( + function CheckmarkIcon(props, ref) { + return ( + + + + ); + }, +); diff --git a/packages/core/icons/src/InformationIcon.tsx b/packages/core/icons/src/InformationIcon.tsx new file mode 100644 index 0000000..0f1ea5c --- /dev/null +++ b/packages/core/icons/src/InformationIcon.tsx @@ -0,0 +1,27 @@ +import { forwardRef } from "react"; +import type { SVGProps } from "react"; + +export const InformationIcon = forwardRef>( + function InformationIcon(props, ref) { + return ( + + + + ); + }, +); diff --git a/packages/core/icons/src/WarningIcon.tsx b/packages/core/icons/src/WarningIcon.tsx new file mode 100644 index 0000000..5ccb78c --- /dev/null +++ b/packages/core/icons/src/WarningIcon.tsx @@ -0,0 +1,27 @@ +import { forwardRef } from "react"; +import type { SVGProps } from "react"; + +export const WarningIcon = forwardRef>( + function WarningIcon(props, ref) { + return ( + + + + ); + }, +); diff --git a/packages/core/icons/src/XMarkIcon.tsx b/packages/core/icons/src/XMarkIcon.tsx new file mode 100644 index 0000000..c320a21 --- /dev/null +++ b/packages/core/icons/src/XMarkIcon.tsx @@ -0,0 +1,27 @@ +import { forwardRef } from "react"; +import type { SVGProps } from "react"; + +export const XMarkIcon = forwardRef>( + function XMarkIcon(props, ref) { + return ( + + + + ); + }, +); diff --git a/packages/core/icons/src/index.ts b/packages/core/icons/src/index.ts new file mode 100644 index 0000000..bf0194b --- /dev/null +++ b/packages/core/icons/src/index.ts @@ -0,0 +1,4 @@ +export { InformationIcon } from "./InformationIcon"; +export { CheckmarkIcon } from "./CheckmarkIcon"; +export { WarningIcon } from "./WarningIcon"; +export { XMarkIcon } from "./XMarkIcon"; diff --git a/packages/core/icons/svg/checkmark.svg b/packages/core/icons/svg/checkmark.svg new file mode 100644 index 0000000..b66984c --- /dev/null +++ b/packages/core/icons/svg/checkmark.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/core/icons/svg/information.svg b/packages/core/icons/svg/information.svg new file mode 100644 index 0000000..76bb7a4 --- /dev/null +++ b/packages/core/icons/svg/information.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/core/icons/svg/warning.svg b/packages/core/icons/svg/warning.svg new file mode 100644 index 0000000..76694ba --- /dev/null +++ b/packages/core/icons/svg/warning.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/core/icons/svg/x-mark.svg b/packages/core/icons/svg/x-mark.svg new file mode 100644 index 0000000..945e072 --- /dev/null +++ b/packages/core/icons/svg/x-mark.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/core/icons/tsconfig.json b/packages/core/icons/tsconfig.json new file mode 100644 index 0000000..e1b7131 --- /dev/null +++ b/packages/core/icons/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "src" + }, + "include": ["src"] +}