Skip to content

Commit

Permalink
#132 Create gacha.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
kento committed May 10, 2023
1 parent a871cad commit a3da4c8
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 3 deletions.
20 changes: 20 additions & 0 deletions components/gacha.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { useState } from "react"

import styles from "../styles/gacha.module.css"
import Link from "next/link"

const Gacha = () => {
const [form, setForm] = useState<number | null>(null)

return (
<div className={styles.wrapper}>
<button className={styles.button}>ガチャを回す</button>

<div className={styles.result}>
<Link href="form1">Form1</Link>
</div>
</div>
)
}

export default Gacha
5 changes: 4 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Header from '../components/header'
import styles from "../styles/style.module.css"
import Description from '../components/description'
import Meta from '../components/meta'
import Gacha from '../components/gacha'

const Home: NextPage = () => (
<>
Expand Down Expand Up @@ -47,7 +48,9 @@ const Home: NextPage = () => (
</section>

<section className={styles.section}>
<h2 className={styles.h2}>&lt;!-- フォームガチャを回す(実装中🙇‍♂️) --&gt;</h2>
<h2 className={styles.h2}>フォームガチャを回す(実装中👷‍♂️)</h2>

<Gacha />

</section>

Expand Down
23 changes: 23 additions & 0 deletions styles/gacha.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.wrapper {
display: flex;
align-items: center;
gap: 0 30px;
margin: 10px auto 30px;
padding: 30px 0;
}

.button {
padding: 15px 30px;
border: 1px solid var(--border-color);
border-radius: 3px;
background-color: transparent;
cursor: pointer;
}

.button:hover {
background-color: #eee;
}

.result {
border: 1px solid red;
}
5 changes: 3 additions & 2 deletions styles/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@

.h1 {
margin-bottom: 10px;
font-size: clamp(1.45rem, 2vw, 2.5rem);
font-size: clamp(1.45rem, 3vw, 2.25rem);
font-weight: normal;
}

.h2 {
margin-bottom: 10px;
font-size: clamp(1.35rem, 1.4vw, 1.65rem);
font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.list {
Expand Down

0 comments on commit a3da4c8

Please sign in to comment.