Skip to content

Commit 1406781

Browse files
committed
a
1 parent 60c2333 commit 1406781

File tree

2 files changed

+54
-54
lines changed

2 files changed

+54
-54
lines changed

src/pages/index.tsx

+37-37
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,45 @@ export const AnimatedDialogOverlay = animated(DialogOverlay);
88
export const AnimatedDialogContent = animated(DialogContent);
99

1010
export default function Home() {
11-
const [isOpen, setIsOpen] = useState(false);
11+
const [isOpen, setIsOpen] = useState(false);
1212

13-
const open = () => setIsOpen(true);
14-
const close = () => setIsOpen(false);
13+
const open = () => setIsOpen(true);
14+
const close = () => setIsOpen(false);
1515

16-
const transitions = useTransition(isOpen, {
17-
from: {
18-
opacity: 1,
19-
scale: 0.9,
20-
},
21-
enter: {
22-
opacity: 1,
23-
scale: 1,
24-
},
25-
leave: {
26-
opacity: 0,
27-
},
28-
});
16+
const transitions = useTransition(isOpen, {
17+
from: {
18+
opacity: 1,
19+
scale: 0.9,
20+
},
21+
enter: {
22+
opacity: 1,
23+
scale: 1,
24+
},
25+
leave: {
26+
opacity: 0,
27+
},
28+
});
2929

30-
return (
31-
<div>
32-
<Dialog isOpen={isOpen} onDismiss={close}>
33-
{transitions((styles) => {
34-
return (
35-
<AnimatedDialogOverlay style={{ position: "absolute", opacity: styles.opacity }}>
36-
<AnimatedDialogContent style={styles}>
37-
<button onClick={() => setIsOpen(false)}>Close Dialog</button>
38-
<p>React Spring makes it too easy!</p>
39-
<input type="text" />
40-
<br />
41-
<input type="text" />
42-
<button>Ayyyyyy</button>
43-
</AnimatedDialogContent>
44-
</AnimatedDialogOverlay>
45-
);
46-
})}
47-
</Dialog>
30+
return (
31+
<div>
32+
<Dialog isOpen={isOpen} onDismiss={close}>
33+
{transitions(styles => {
34+
return (
35+
<AnimatedDialogOverlay style={{ position: "absolute", opacity: styles.opacity }}>
36+
<AnimatedDialogContent style={styles}>
37+
<button onClick={() => setIsOpen(false)}>Close Dialog</button>
38+
<p>owo</p>
39+
<input type="text" />
40+
<br />
41+
<input type="text" />
42+
<button>Ayyyyyy</button>
43+
</AnimatedDialogContent>
44+
</AnimatedDialogOverlay>
45+
);
46+
})}
47+
</Dialog>
4848

49-
<button onClick={open}>hi</button>
50-
</div>
51-
);
49+
<button onClick={open}>hi</button>
50+
</div>
51+
);
5252
}

tsconfig.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"compilerOptions": {
3-
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
5-
"allowJs": true,
6-
"skipLibCheck": true,
7-
"strict": true,
8-
"forceConsistentCasingInFileNames": true,
9-
"noEmit": true,
10-
"esModuleInterop": true,
11-
"module": "esnext",
12-
"moduleResolution": "node",
13-
"resolveJsonModule": true,
14-
"isolatedModules": true,
15-
"jsx": "preserve"
16-
},
17-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
18-
"exclude": ["node_modules"]
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": ["dom", "dom.iterable", "esnext"],
5+
"allowJs": true,
6+
"skipLibCheck": true,
7+
"strict": true,
8+
"forceConsistentCasingInFileNames": true,
9+
"noEmit": true,
10+
"esModuleInterop": true,
11+
"module": "esnext",
12+
"moduleResolution": "node",
13+
"resolveJsonModule": true,
14+
"isolatedModules": true,
15+
"jsx": "preserve"
16+
},
17+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
18+
"exclude": ["node_modules"]
1919
}

0 commit comments

Comments
 (0)