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
Add: スマホ版ののHomeのUI(メディアクエリは夜眠くなってからに回す) #16
+180
−18
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
af47151
Add: スマホ版ののHomeのUI(メディアクエリは夜眠くなってからに回す)
Sea10wood 19f93e2
fix: blank_index.tsx
Sea10wood 29a70e9
Add:homeのPCとスマホのレンダリングわけ
Sea10wood 3331dc7
fix: rootをhomeに
Sea10wood 249cef2
fix: homeのdevice.tsの追加とそれに伴った修正
Sea10wood 15f6c4b
fix: 余計なくblankの削除
Sea10wood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max-widthは他でも使う可能性があるので
utils/device.ts
にconstとして宣言したい