Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions frameworks/react/web-notifications-wrapper/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
5 changes: 5 additions & 0 deletions frameworks/react/web-notifications-wrapper/LICENSE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
> **_:information_source: OpenFin Workspace:_** [OpenFin Workspace](https://www.openfin.co/workspace/) is a commercial product and this repo is for evaluation purposes. Use of the OpenFin Container and OpenFin Workspace components is only granted pursuant to a license from OpenFin. Please [**contact us**](https://www.openfin.co/workspace/poc/) if you would like to request a developer evaluation key or to discuss a production license.

The developer license can be found here:

- [https://www.openfin.co/developer-agreement/](https://www.openfin.co/developer-agreement/)
31 changes: 31 additions & 0 deletions frameworks/react/web-notifications-wrapper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Web Notifications Wrapper

Project that bundles all the dependencies of the OpenFin Web Notification Center into a single file.

It exposes a single React provider component which you can wrap your application with to enable the Notification Center for React projects.

You must get a reference to the `fin` api from the connect() function of core-web, then pass it in as a prop.

``` typescript
return (
<NotificationsProvider finApi={finApi}>
<h1>My application</h1>
</NotificationsProvider>
);
```

### Required CSS

CSS for the notification center is not bundled, so needs to be added to the consuming app:

```css
#notification_center_container {
position: fixed;
width: 345px;
height: 100dvh;
right: 0;
top: 0;
align-self: center;
z-index: 100;
}
```
Loading