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

feat: publisher card ui #2592

Merged
merged 5 commits into from
Jul 28, 2023
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
13 changes: 9 additions & 4 deletions src/app/components/PaymentSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ const PaymentSummary: FC<Props> = ({

return (
<dl className="mb-0">
<dt className="font-medium dark:text-white">{tCommon("amount")}</dt>
<dd className="text-gray-500 dark:text-neutral-400">
{getFormattedSats(amount)}
<dt className="text-sm text-gray-500 dark:text-neutral-500">
{tCommon("amount")}
</dt>
<dd className="text-lg text-gray-700 dark:text-neutral-200 flex flex-row justify-between">
<div>{getFormattedSats(amount)}</div>
{!!fiatAmount && (
<span className="text-gray-400" data-testid="fiat_amount">
<span
className="text-gray-500 dark:text-neutral-500"
data-testid="fiat_amount"
>
{" "}
(~{fiatAmount})
</span>
Expand Down
29 changes: 16 additions & 13 deletions src/app/components/PublisherCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function PublisherCard({
>
{image && (
<img
className={`ml-1 mr-2 shrink-0 object-cover rounded-md ${
className={`shrink-0 object-cover rounded-md ${
isSmall ? "w-10 h-10 mr-3" : "w-20 h-20"
}`}
src={image || DEFAULT_IMAGE}
Expand All @@ -50,17 +50,17 @@ export default function PublisherCard({
/>
)}
<div
className={
"flex flex-col overflow-hidden w-full " +
(isSmall ? "" : "text-center ") +
(isSmall && !image && "ml-1")
}
className={classNames(
"flex flex-col overflow-hidden w-full",
!isSmall && "text-center",
isSmall && !image && "ml-1"
)}
>
<h2
title={title}
className={
"font-semibold dark:text-white overflow-hidden text-ellipsis whitespace-nowrap leading-1" +
(isSmall ? " text-l" : " my-2 text-xl")
"font-semibold dark:text-white overflow-hidden text-ellipsis whitespace-nowrap" +
(isSmall ? "" : " mt-2 text-xl")
}
>
{title}
Expand All @@ -70,7 +70,10 @@ export default function PublisherCard({
href={`https://${url}`}
title={url}
target="_blank"
className="text-gray-500 dark:text-gray-400 overflow-hidden mb-2 text-ellipsis whitespace-nowrap leading-1"
className={classNames(
"text-gray-500 dark:text-neutral-500 overflow-hidden text-ellipsis whitespace-nowrap",
isSmall && "text-xs"
)}
rel="noreferrer noopener"
>
{url}
Expand All @@ -79,10 +82,10 @@ export default function PublisherCard({
{!url && description && (
<p
title={description}
className={
"text-gray-500 dark:text-gray-400 line-clamp-2" +
(isSmall ? " -mt-1" : " mb-2")
}
className={classNames(
"text-gray-500 dark:text-neutral-500 overflow-hidden text-ellipsis whitespace-nowrap",
isSmall && "text-xs"
)}
>
{description}
</p>
Expand Down