Skip to content

Commit

Permalink
6. Add example of library usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Połubiński committed Feb 28, 2023
1 parent 3cd4386 commit eb15714
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -49,4 +49,10 @@ Running all apps: `npx nx run-many --target=serve --all`
"port": 3001
},
}
```

## How to import libraries to apps

```ts
import { Bell } from '@system/figa-ui';
```
2 changes: 2 additions & 0 deletions system/apps/blog-creator/src/app/app.tsx
@@ -1,6 +1,7 @@
import styled from 'styled-components';

import NxWelcome from './nx-welcome';
import { Bell } from '@system/figa-ui';

import { Route, Routes, Link } from 'react-router-dom';

Expand All @@ -12,6 +13,7 @@ export function App() {
return (
<StyledApp>
<NxWelcome title="blog-creator" />
<Bell />

{/* START: routes */}
{/* These routes and navigation have been generated for you */}
Expand Down
2 changes: 2 additions & 0 deletions system/apps/blog/pages/_app.tsx
@@ -1,6 +1,7 @@
import { AppProps } from 'next/app';
import Head from 'next/head';
import './styles.css';
import { Bell } from '@system/figa-ui';

function CustomApp({ Component, pageProps }: AppProps) {
return (
Expand All @@ -10,6 +11,7 @@ function CustomApp({ Component, pageProps }: AppProps) {
</Head>
<main className="app">
<Component {...pageProps} />
<Bell />
</main>
</>
);
Expand Down

0 comments on commit eb15714

Please sign in to comment.