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

fix(components-Card): fix card spacing styles #1255

Merged
merged 2 commits into from
Apr 16, 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
5 changes: 5 additions & 0 deletions components/Card/Card.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@
.ant-card-meta-description {
@apply dark:text-gray-50/50;
}

/* Add padding to card title */
.ant-card-head-title {
@apply py-3;
}
4 changes: 2 additions & 2 deletions components/GithubCard/GithubRepoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function GithubRepoCard({ repo }: Props): JSX.Element {
return (
<Badge.Ribbon text={repo.name} color={getColorByName(repo.name)}>
<Card
className="mt-8"
className="!mt-5"
title={(
<a href={repo.repoUrl}>
<Branches className="align-top text-4xl" />
Expand All @@ -24,7 +24,7 @@ function GithubRepoCard({ repo }: Props): JSX.Element {
>
<Meta
title={(
<Tag className="mb-3" color={getColorByName(repo.language)}>
<Tag className="!mb-3" color={getColorByName(repo.language)}>
{repo.language}
</Tag>
)}
Expand Down
24 changes: 12 additions & 12 deletions components/GithubCard/__snapshots__/GithubCard.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ exports[`GithubCard should render correctly (snapshot) 1`] = `
class="ant-ribbon-wrapper"
>
<div
class="ant-card ant-card-bordered mt-8 card"
class="ant-card ant-card-bordered !mt-5 card"
>
<div
class="ant-card-head"
Expand Down Expand Up @@ -240,7 +240,7 @@ exports[`GithubCard should render correctly (snapshot) 1`] = `
class="ant-card-meta-title"
>
<span
class="ant-tag ant-tag-has-color mb-3"
class="ant-tag ant-tag-has-color !mb-3"
style="background-color: rgb(245, 159, 0);"
>
TypeScript
Expand Down Expand Up @@ -293,7 +293,7 @@ exports[`GithubCard should render correctly (snapshot) 1`] = `
class="ant-ribbon-wrapper"
>
<div
class="ant-card ant-card-bordered mt-8 card"
class="ant-card ant-card-bordered !mt-5 card"
>
<div
class="ant-card-head"
Expand Down Expand Up @@ -348,7 +348,7 @@ exports[`GithubCard should render correctly (snapshot) 1`] = `
class="ant-card-meta-title"
>
<span
class="ant-tag ant-tag-has-color mb-3"
class="ant-tag ant-tag-has-color !mb-3"
style="background-color: rgb(215, 51, 108);"
>
C
Expand Down Expand Up @@ -401,7 +401,7 @@ exports[`GithubCard should render correctly (snapshot) 1`] = `
class="ant-ribbon-wrapper"
>
<div
class="ant-card ant-card-bordered mt-8 card"
class="ant-card ant-card-bordered !mt-5 card"
>
<div
class="ant-card-head"
Expand Down Expand Up @@ -456,7 +456,7 @@ exports[`GithubCard should render correctly (snapshot) 1`] = `
class="ant-card-meta-title"
>
<span
class="ant-tag ant-tag-has-color mb-3"
class="ant-tag ant-tag-has-color !mb-3"
style="background-color: rgb(112, 72, 232);"
>
Zsh
Expand Down Expand Up @@ -710,7 +710,7 @@ exports[`GithubCard should render correctly when missing bio and location data (
class="ant-ribbon-wrapper"
>
<div
class="ant-card ant-card-bordered mt-8 card"
class="ant-card ant-card-bordered !mt-5 card"
>
<div
class="ant-card-head"
Expand Down Expand Up @@ -765,7 +765,7 @@ exports[`GithubCard should render correctly when missing bio and location data (
class="ant-card-meta-title"
>
<span
class="ant-tag ant-tag-has-color mb-3"
class="ant-tag ant-tag-has-color !mb-3"
style="background-color: rgb(245, 159, 0);"
>
TypeScript
Expand Down Expand Up @@ -818,7 +818,7 @@ exports[`GithubCard should render correctly when missing bio and location data (
class="ant-ribbon-wrapper"
>
<div
class="ant-card ant-card-bordered mt-8 card"
class="ant-card ant-card-bordered !mt-5 card"
>
<div
class="ant-card-head"
Expand Down Expand Up @@ -873,7 +873,7 @@ exports[`GithubCard should render correctly when missing bio and location data (
class="ant-card-meta-title"
>
<span
class="ant-tag ant-tag-has-color mb-3"
class="ant-tag ant-tag-has-color !mb-3"
style="background-color: rgb(215, 51, 108);"
>
C
Expand Down Expand Up @@ -926,7 +926,7 @@ exports[`GithubCard should render correctly when missing bio and location data (
class="ant-ribbon-wrapper"
>
<div
class="ant-card ant-card-bordered mt-8 card"
class="ant-card ant-card-bordered !mt-5 card"
>
<div
class="ant-card-head"
Expand Down Expand Up @@ -981,7 +981,7 @@ exports[`GithubCard should render correctly when missing bio and location data (
class="ant-card-meta-title"
>
<span
class="ant-tag ant-tag-has-color mb-3"
class="ant-tag ant-tag-has-color !mb-3"
style="background-color: rgb(112, 72, 232);"
>
Zsh
Expand Down
Loading