Skip to content

Commit

Permalink
Merge pull request #15 from cat-crosswalk/SSlime/add-card-theme
Browse files Browse the repository at this point in the history
✨ ボーダーの色追加したりカード追加したり
  • Loading branch information
SSlime-s authored May 24, 2024
2 parents 384457c + ec2dd45 commit ef46c84
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
18 changes: 13 additions & 5 deletions apps/client/app/routes/tokens.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import card from "@/theme/card";
import colors from "@/theme/colors";
import typography from "@/theme/typography";
import { css } from "@emotion/react";
Expand All @@ -8,7 +9,7 @@ import { Fragment } from "react";
export default function Tokens() {
return (
<div>
<section>
<Card>
<Title>Typography</Title>
{Object.entries(typography).map(([key, value]) => {
return (
Expand All @@ -17,8 +18,8 @@ export default function Tokens() {
</div>
);
})}
</section>
<section>
</Card>
<Card>
<Title>Colors</Title>
{Object.entries(colors).map(([key, value]) => {
return (
Expand Down Expand Up @@ -53,11 +54,18 @@ export default function Tokens() {
</section>
);
})}
</section>
</Card>
</div>
);
}

const Card = styled.section`
${card.default}
padding: 2rem 3rem;
margin: 2rem;
`;

const Title = styled.h2`
${typography.heading1}
Expand Down Expand Up @@ -96,5 +104,5 @@ const Sample = styled.div`
height: 2rem;
width: 8rem;
box-shadow: 0 0 4px -1px ${colors.text.primary.default};
box-shadow: 0 0 4px -1px ${colors.border.primary.default};
`;
8 changes: 8 additions & 0 deletions apps/client/app/theme/card.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import colors from "@/theme/colors";

export default {
default: {
border: `2px solid ${colors.border.primary.default}`,
boxShadow: `6px 6px 0 0 ${colors.border.primary.default}`,
},
} as const satisfies Record<string, React.CSSProperties>;
5 changes: 5 additions & 0 deletions apps/client/app/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,9 @@ export default {
"hover-secondary": "#fff1c0",
},
},
border: {
primary: {
default: "#000000",
},
},
} as const;

0 comments on commit ef46c84

Please sign in to comment.