sapp-notification
v1.2.0
Published
Made with create-react-library
Readme
sapp-notification-package
Made with create-react-library
Install
npm i sapp-notificationUsage
Sử dụng node version từ 20 trở lên (Nên dùng: v22.14.0)
Cài đặt tất cả các package: yarn install
Chạy dự án bằng lệnh: yarn start
Khi muốn chạy thư mục example: (Ngoài ra có thể dùng yarn link)
- Tại cửa sổ terminal chạy lệnh: cd example
- Cài đặt tất cả các package: yarn install
- Chạy tiếp lệnh: $env:NODE_OPTIONS="--openssl-legacy-provider"
- Sau đó chạy lệnh : yarn start
Hướng dẫn sử dụng yarn link để sử dụng package này tại chạy local tại project cụ thể:
- Tại package này tại cửa sổ terminal chạy lệnh: yarn link
- Tại cửa sổ terminal của project của bạn chạy lệnh: yarn link sapp-notification-package
- Sau khi chạy lệnh trên có thông báo success là được
Hướng dẫn import package sau khi yarn link thành công:
- Tại component muốn sử dụng package hãy import như sau: import SappNotificationComponent from 'sapp-notification-package'
- Truyền props cần thiết xuống package: {openNotification && ( )}
- Tiếp theo nếu dùng Next import css của package vào file (src/page/_app.tsx) còn nếu dùng React thì import vào file (src/index.tsx hoặc src/App.tsx): import 'sapp-notification-package/src/styles/global.css'
- Như vậy là đã hoàn tất.
License
This project is licensed under the MIT License © 2025 sapp
