Replace entire codebase with homarr-labs/homarr
This commit is contained in:
4
packages/notifications/eslint.config.js
Normal file
4
packages/notifications/eslint.config.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import baseConfig from "@homarr/eslint-config/base";
|
||||
|
||||
/** @type {import('typescript-eslint').Config} */
|
||||
export default [...baseConfig];
|
||||
2
packages/notifications/index.ts
Normal file
2
packages/notifications/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./src";
|
||||
export { Notifications } from "@mantine/notifications";
|
||||
37
packages/notifications/package.json
Normal file
37
packages/notifications/package.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "@homarr/notifications",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./styles.css": "./src/styles.css"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -rf .turbo node_modules",
|
||||
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"prettier": "@homarr/prettier-config",
|
||||
"dependencies": {
|
||||
"@homarr/ui": "workspace:^0.1.0",
|
||||
"@mantine/notifications": "^8.3.10",
|
||||
"@tabler/icons-react": "^3.36.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||
"@homarr/prettier-config": "workspace:^0.1.0",
|
||||
"@homarr/tsconfig": "workspace:^0.1.0",
|
||||
"eslint": "^9.39.2",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
17
packages/notifications/src/index.tsx
Normal file
17
packages/notifications/src/index.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { NotificationData } from "@mantine/notifications";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
import { IconCheck, IconX } from "@tabler/icons-react";
|
||||
|
||||
export const showSuccessNotification = (props: NotificationData) =>
|
||||
notifications.show({
|
||||
...props,
|
||||
color: "teal",
|
||||
icon: <IconCheck size={20} />,
|
||||
});
|
||||
|
||||
export const showErrorNotification = (props: NotificationData) =>
|
||||
notifications.show({
|
||||
...props,
|
||||
color: "red",
|
||||
icon: <IconX size={20} />,
|
||||
});
|
||||
1
packages/notifications/src/styles.css
Normal file
1
packages/notifications/src/styles.css
Normal file
@@ -0,0 +1 @@
|
||||
@import "@mantine/notifications/styles.css";
|
||||
8
packages/notifications/tsconfig.json
Normal file
8
packages/notifications/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "@homarr/tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
||||
},
|
||||
"include": ["*.ts", "src"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user