This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from claustra01/home_page
Add: スマホ版ののHomeのUI(メディアクエリは夜眠くなってからに回す)
- Loading branch information
Showing
7 changed files
with
180 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.button-style { | ||
border-width: 0; | ||
|
||
&:hover { | ||
&:not([disabled]) { | ||
scale: 1.2; | ||
} | ||
} | ||
|
||
&[data-size="sm"] { | ||
padding: 4px 8px; | ||
font-size: 12px; | ||
border-radius: 4px; | ||
} | ||
|
||
&[data-size="md"] { | ||
padding: 4px 32px; | ||
font-size: 24px; | ||
font-weight: bold; | ||
border-radius: 4px; | ||
} | ||
|
||
&[data-size="lg"] { | ||
padding: 8px 48px; | ||
font-size: 24px; | ||
font-weight: bold; | ||
border-radius: 4px; | ||
white-space: nowrap; | ||
} | ||
|
||
&[data-variant="contained"] { | ||
color: var(--white); | ||
|
||
|
||
&[data-color="red"] { | ||
background-color: var(--red); | ||
} | ||
|
||
&[data-color="black"] { | ||
background-color: var(--black); | ||
} | ||
} | ||
|
||
&[data-variant="outlined"] { | ||
background-color: var(--white); | ||
color: var(--black); | ||
border-width: 2px; | ||
border-style: solid; | ||
|
||
&[data-color="red"] { | ||
border-color: var(--red); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import type { ComponentPropsWithoutRef, ReactNode } from "react"; | ||
import styles from "./index.module.css"; | ||
|
||
type ButtonProps = { | ||
children: ReactNode; | ||
variant?: "contained" | "outlined"; | ||
size?: "sm" | "md" | "lg"; | ||
color?: "red" | "black"; | ||
} & ComponentPropsWithoutRef<"button">; | ||
|
||
export const DefaultButton = ({ | ||
children, | ||
variant = "outlined", | ||
size = "md", | ||
color = "red", | ||
...props | ||
}: ButtonProps) => { | ||
return ( | ||
<button | ||
className={styles["button-style"]} | ||
data-variant={variant} | ||
data-size={size} | ||
data-color={color} | ||
{...props} | ||
> | ||
{children} | ||
</button> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ body { | |
display: flex; | ||
min-width: 320px; | ||
min-height: 100vh; | ||
background-color: #FFF2F2; | ||
} | ||
|
||
h1 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const device = { | ||
pc: "(min-width: 1024px)", | ||
}; |