Skip to content

Commit

Permalink
Remove papi.react.components
Browse files Browse the repository at this point in the history
  • Loading branch information
irahopkinson committed May 26, 2023
1 parent 7162118 commit 4cfc95f
Show file tree
Hide file tree
Showing 12 changed files with 21,362 additions and 18,952 deletions.
4 changes: 2 additions & 2 deletions extensions/lib/hello-world/hello-world.web-view.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
const {
react: {
hooks: { usePromise },
components: { Button },
},
logger,
} = papi;
Expand Down Expand Up @@ -58,8 +57,9 @@
'div',
null,
createElement(
Button,
'button',
{
type: 'button',
onClick: () => {
logger.info(`${NAME} Button clicked!`);
setMyState((myStateCurrent) => myStateCurrent + 1);
Expand Down
19 changes: 18 additions & 1 deletion extensions/lib/hello-world/hello-world.web-view.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import papi from 'papi';
import { Button } from 'papi-components';
import {
Button,
Checkbox,
ComboBox,
RefSelector,
Slider,
Switch,
TextField,
} from 'papi-components';
import { useCallback, useContext, useState } from 'react';

const {
Expand Down Expand Up @@ -72,6 +80,15 @@ globalThis.webViewComponent = function HelloWorld() {
</Button>
</div>
<div>{latestVerseText}</div>
<br />
<div>
<TextField label="Test Me" />
<Checkbox labelText="Test Me" />
<Switch /> {/* no label available */}
<ComboBox title="Test Me" options={['option 1', 'option 2']} />
<Slider /> {/* no label available */}
<RefSelector scrRef={{ book: 1, chapter: 1, verse: 1 }} handleSubmit={(): void => {}} />
</div>
</div>
);
};
Loading

0 comments on commit 4cfc95f

Please sign in to comment.