Skip to content

Commit

Permalink
docs: update exmple
Browse files Browse the repository at this point in the history
  • Loading branch information
alstn113 committed May 14, 2023
1 parent 7dcd4aa commit 615829b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion example/react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@wap-ui/react": "^1.3.2",
"@wap-ui/react": "^2.0.0",
"framer-motion": "^7.6.15",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
12 changes: 9 additions & 3 deletions example/react-ts/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dancingCat from './assets/dancing-cat.gif';
import styled from '@emotion/styled';
import { Button, Modal, useDisclosure } from '@wap-ui/react';
import { Button, Modal, Tooltip, useDisclosure } from '@wap-ui/react';

function App() {
const { isOpen, onClose, onOpen } = useDisclosure();
Expand All @@ -10,13 +10,18 @@ function App() {
return (
<Container>
<Button color="success" shadow onClick={onOpen}>
Please Open This
Click me
</Button>
<Tooltip color="error" placement="bottom" content="Boom!~~~">
<Button color="error" shadow>
Hover me
</Button>
</Tooltip>
<Modal isOpen={isOpen} onClose={onClose}>
<Modal.Header onClose={onClose}>From WAP-UI</Modal.Header>
<Modal.Body>
<ContentWrapper>
<span>Thank you for using the library</span>
<span>Thank you for using this library</span>
<ContentImage src={dancingCat} alt="dancingCat" />
<span>If you like it, please give me a star!</span>
</ContentWrapper>
Expand All @@ -40,6 +45,7 @@ const Container = styled.div`
align-items: center;
justify-content: center;
height: 100vh;
gap: 4rem;
`;

const ContentWrapper = styled.div`
Expand Down
8 changes: 4 additions & 4 deletions example/react-ts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,10 @@
magic-string "^0.26.7"
react-refresh "^0.14.0"

"@wap-ui/react@^1.3.2":
version "1.3.2"
resolved "https://registry.yarnpkg.com/@wap-ui/react/-/react-1.3.2.tgz#000708a4851ee01f6611c1f3b0e1c30a291d62c6"
integrity sha512-B9tvID8PuFepEy2z5+iQFpHykqmdneeRgRFKs9T4o3PjraB84lCTlbxqfnNeX+IA34+LLr6EtH2Sg9BAzlUOBA==
"@wap-ui/react@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@wap-ui/react/-/react-2.0.0.tgz#0952a6f362f7bf9b4b79adc7df08bda77b70727a"
integrity sha512-kokxT7Jk5DgGxWIegLQiJYil7bRmhGsKxWSYjMOHWfSn+4kqQxF7S5zSLOWGdtUwLP1Zp9MJKs3HOb9oD3d4WA==
dependencies:
"@emotion/react" "^11.10.4"
"@emotion/styled" "^11.10.4"
Expand Down

0 comments on commit 615829b

Please sign in to comment.