feat(example-app): example app for nui

This commit is contained in:
Christopher committed 2020-12-12 18:08:57 +01:00
1 parent 27a0ee72b4
commit 260cda6275
4 files changed
+38 -6

No files matched your search

@@ -1,17 +1,22 @@
import React from "react";
import React from 'react';
import { AppWrapper } from "../../../ui/components";
import { AppTitle } from "../../../ui/components/AppTitle";
import { AppContent } from "../../../ui/components/AppContent";
import { useApp } from "../../../os/apps/hooks/useApps";
import { AppWrapper } from '../../../ui/components';
import { AppTitle } from '../../../ui/components/AppTitle';
import { AppContent } from '../../../ui/components/AppContent';
import { useApp } from '../../../os/apps/hooks/useApps';
import { useExample } from '../hooks/useExample';
export const ExampleApp = () => {
const example = useApp("EXAMPLE");
// calling the example hook, and we assign the value to a variable
const exampleString = useExample();
const example = useApp('EXAMPLE');
return (
<AppWrapper>
<AppTitle app={example} />
<AppContent>
<h1>This is an example</h1>
{/* Here we are using the value in a h3 tag */}
<h3>{exampleString}</h3>
</AppContent>
</AppWrapper>
);