Skip to content

Commit

Permalink
Merge pull request #151 from kento-yoshidu/132_Gacha
Browse files Browse the repository at this point in the history
#132 スタイルを微修正
  • Loading branch information
kento-yoshidu authored May 14, 2023
2 parents e1157c1 + 9844797 commit cb54f6e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
10 changes: 8 additions & 2 deletions components/gacha.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ import Loading from "./loading"

import styles from "../styles/gacha.module.css"

import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { faCircleLeft } from "@fortawesome/free-solid-svg-icons"

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

const handleClick = () => {
new Promise((resolve) => {
setIsLoading(true)
setForm(Math.ceil(Math.random() * 5))
setForm(Math.ceil(Math.random() * 6))

setTimeout(() => {
resolve("")
Expand Down Expand Up @@ -53,7 +56,10 @@ const Gacha = () => {
</Link>
)
: (
<p className={styles.message}>ガチャを回してね</p>
<p className={styles.message}>
{/* @ts-ignore */}
<FontAwesomeIcon icon={faCircleLeft} />
ガチャを回してね</p>
)}
</>
)}
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Home: NextPage = () => (
</section>

<section className={styles.section}>
<h2 className={styles.h2}>フォームガチャ(実装中👷‍♂️)</h2>
<h2 className={styles.h2}>フォームガチャ</h2>

<Gacha />

Expand Down
12 changes: 10 additions & 2 deletions styles/gacha.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
}

.button {
padding: 15px 30px;
padding: 12px 25px;
border: 1px solid var(--border-color);
border-radius: 3px;
background-color: transparent;
font-size: 1.01rem;
font-family: inherit;
cursor: pointer;
}

Expand Down Expand Up @@ -59,9 +61,15 @@
}
}

.message svg {
margin-right: 5px;
font-size: 1.05rem;
color: #555;
}

.link {
padding: 8px 20px;
border: 1px solid var(--border-color);
color: #444;
font-size: clamp(0.9rem, 1.35vw, 1.05rem);
}
}

0 comments on commit cb54f6e

Please sign in to comment.