Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: fix event card #307

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type Story = StoryObj<T>;
export const Default: Story = {
args: {
children: "test test test test test ああああああああああああああああああああああああ",
hash: "test",
hash: "game",
title: "Test title",
},
};
Expand Down
9 changes: 7 additions & 2 deletions app/routes/_index/features/EventCard/EventCard.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Link } from "@remix-run/react";
import type { ReactNode } from "react";
import * as styles from "./styles.css";
import RightArrow from "~icons/ic/round-play-arrow";

interface Props {
children: string;
hash: string;
hash: "game" | "live" | "stage";
title: string;
}

Expand All @@ -18,7 +19,11 @@ export function EventCard({ children, hash, title }: Props): ReactNode {
prefetch="intent"
to={`/events#${hash}`}
>
詳しく見る
<span className={styles.span}>
{hash === "game" ? "ゲームイベント" : hash === "live" ? "ライブイベント" : "ステージイベント"}
について
</span>
<RightArrow className={styles.arrow} />
</Link>
</div>
);
Expand Down
41 changes: 30 additions & 11 deletions app/routes/_index/features/EventCard/styles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const box = style({
},
"backdropFilter": "blur(32px)",
"backgroundImage": "linear-gradient(154deg, rgb(255 255 255 / 0.09) 0%, rgb(255 255 255 / 0.03) 100%)",
"border": `1px solid ${vars.color.white}`,
"borderRadius": "1.25rem",
"display": "flex",
"flexDirection": "column",
Expand Down Expand Up @@ -46,18 +47,36 @@ export const content = style({
export const link = style({
"@layer": {
[layers.feature]: {
":hover": {
transform: "scale(1.05)",
display: "inline-flex",
justifyContent: "flex-end",
padding: "0.5rem 1rem",
rowGap: "0.5rem",
},
},
});

export const span = style({
"@layer": {
[layers.feature]: {
color: vars.color.white,
fontSize: "0.875rem",
fontWeight: 600,
},
},
});

export const arrow = style({
"@layer": {
[layers.feature]: {
color: vars.color.white,
height: "1.125rem",
selectors: {
[`${link}:hover &`]: {
transform: "scale(1.5)",
},
},
"alignSelf": "flex-end",
"border": `1px solid ${vars.color.white}`,
"borderRadius": "0.5rem",
"boxShadow": "0px 4px 4px 0px rgb(0 0 0 / 0.25)",
"color": vars.color.white,
"fontSize": "0.875rem",
"fontWeight": 600,
"padding": "0.5rem 1rem",
"transition": "transform 0.3s ease-in",
transition: "transform 0.3s ease-in",
width: "1.125rem",
},
},
});