Skip to content

Commit b9d2a14

Browse files
authored
Merge pull request #49 from firstcontributions/card-rework
2 parents bd1b16b + 9527a88 commit b9d2a14

File tree

9 files changed

+15
-11
lines changed

9 files changed

+15
-11
lines changed

app/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function MainView(props: { queryRef: PreloadedQuery<HomeQuery> }) {
5555
let leftSidebar = <Login />
5656
if (data.viewer) {
5757
leftSidebar = (
58-
<Card>
58+
<Card classes="p-4">
5959
<UserDetails user={data.viewer} />
6060
</Card>
6161
)

app/issues/Issues.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function Issues(props: { queryRef: PreloadedQuery<IssuesQuery> }) {
6363
<Layout
6464
sidebarContentRight={<>UserPage right sidebar</>}
6565
sidebarContentLeft={
66-
<Card>
66+
<Card classes="p-4">
6767
<UserDetails user={data.viewer} />
6868
</Card>
6969
}

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default function RootLayout({
66
children: React.ReactNode
77
}) {
88
return (
9-
<html lang="en">
9+
<html lang="en" className="dark">
1010
<head />
1111
<body>{children}</body>
1212
</html>

app/user/[handle]/UserPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function User(props: { queryRef: PreloadedQuery<UserPageQuery> }) {
5858
<Layout
5959
sidebarContentRight={<>UserPage right sidebar</>}
6060
sidebarContentLeft={
61-
<Card>
61+
<Card classes="p-4">
6262
<UserDetails user={data.user} />
6363
</Card>
6464
}

src/components/Card.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export default function Card({
99
}) {
1010
return (
1111
<div
12-
className={` ${classes || ''} p-4 bg-white dark:bg-dark-700 rounded-md`}
12+
className={` ${
13+
classes || ''
14+
} rounded-lg shadow-lg hover:shadow-md bg-white dark:bg-dark-700`}
1315
>
1416
{children}
1517
</div>

src/components/UserDetails/Badges/BadgeList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const BadgeList = ({ user }: { user: BadgeList_user$key }) => {
3131
}
3232

3333
return (
34-
<div className="space-y-4">
34+
<div className="flex flex-col space-y-4">
3535
{data.badges.edges.map(
3636
(badge) => badge && <Badge key={badge.node.id} badge={badge.node} />
3737
)}

src/components/feed/StoryPreview.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { GoKebabVertical } from '@react-icons/all-files/go/GoKebabVertical'
66
import Link from 'next/link'
77
import { ErrorBoundary } from 'react-error-boundary'
88
import ErrorFallback from '../ErrorFallback'
9+
import Card from '../Card'
910

1011
type StoryPreviewProps = {
1112
story: StoryPreview_node$key
@@ -32,7 +33,7 @@ const StoryPreview = ({ story }: StoryPreviewProps) => {
3233

3334
return (
3435
<ErrorBoundary FallbackComponent={ErrorFallback}>
35-
<div className="my-8 mr-2 flex flex-col bg-white dark:bg-dark-700 rounded-md">
36+
<Card classes="my-8 mr-2 flex flex-col ">
3637
<Link href={`/story/${data.id}___${data.urlSuffix}`}>
3738
<div>
3839
{data.thumbnail ? (
@@ -78,7 +79,7 @@ const StoryPreview = ({ story }: StoryPreviewProps) => {
7879
}
7980
`}
8081
</style>
81-
</div>
82+
</Card>
8283
</ErrorBoundary>
8384
)
8485
}

src/components/issue/Issue.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { graphql, useFragment } from 'react-relay'
22
import { Issue_node$key } from '__generated__/Issue_node.graphql'
3+
import Card from '../Card'
34

45
export type IssueProps = {
56
issue: Issue_node$key
@@ -20,7 +21,7 @@ const Issue = ({ issue }: IssueProps) => {
2021
issue
2122
)
2223
return (
23-
<div className="flex flex-col p-6 rounded-lg shadow-lg hover:shadow-md bg-white dark:bg-dark-700">
24+
<Card classes="w-96 flex flex-col p-6">
2425
<a href={data.url} target="_blank" rel="noopener noreferrer">
2526
<div className="flex flex-row">
2627
<img
@@ -50,7 +51,7 @@ const Issue = ({ issue }: IssueProps) => {
5051
<div className="mt-2">
5152
<span className="text-l dark:text-gray-300">{data.title}</span>
5253
</div>
53-
</div>
54+
</Card>
5455
)
5556
}
5657

src/components/navbar/HamburgerButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const HamburgerMenu = ({
99
isOpen,
1010
setIsOpen,
1111
}: HamburgerMenuProps) => {
12-
const genericHamburgerLine = `h-1 w-6 my-0.5 rounded-full bg-black transition ease transform duration-300`
12+
const genericHamburgerLine = `h-1 w-6 my-0.5 rounded-full bg-black dark:bg-white transition ease transform duration-300`
1313

1414
return (
1515
<button

0 commit comments

Comments
 (0)