-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6130 from signalco-io/feat/packages/next15-react19
feat(packages): Published all packages for next15 and react19
- Loading branch information
Showing
11 changed files
with
97 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,42 @@ | ||
# signalco UI | ||
# @signalco/ui-notifications | ||
|
||
Some components are based on https://ui.shadcn.com/ | ||
## Getting started | ||
|
||
Use `NotificationsContainer` at the application root to provide notifications injection location. | ||
|
||
```tsx | ||
'use client'; | ||
|
||
import { NotificationsContainer } from '@signalco/ui-notifications'; | ||
|
||
export function ClientProviders() { | ||
return ( | ||
<> | ||
{/* ...other provider components */} | ||
<NotificationsContainer /> | ||
</> | ||
) | ||
} | ||
``` | ||
|
||
Then you can use `showNotification` hook to show notifications. | ||
|
||
```tsx | ||
import { showNotification } from '@signalco/ui-notifications'; | ||
|
||
export function MyComponent() { | ||
const handleAction = () => { | ||
showNotification('Something went wrong.', 'error'); | ||
}; | ||
|
||
return ( | ||
<button onClick={handleAction}>Show notification</button> | ||
); | ||
} | ||
``` | ||
|
||
## Available functions | ||
|
||
- `showNotification` | ||
- `showPrompt` | ||
- `hideNotification` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { defineConfig } from 'tsup'; | ||
|
||
export default defineConfig({ | ||
entry: ['./src/index.ts'], | ||
format: ['esm'], | ||
minify: true, | ||
experimentalDts: true, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.