Invoice: Adjust styles (#5728)

This commit is contained in:
Alexander Zinchuk 2025-03-21 14:02:01 +04:00
parent 26ba41cb4c
commit 1e6d8a1f9f
4 changed files with 17 additions and 3 deletions

View File

@ -5,10 +5,20 @@
margin-bottom: 0;
}
.info {
line-height: 1.25;
}
.description {
position: relative;
margin-top: 0.5rem;
.description-text {
.star-amount-icon {
margin-inline-start: 0;
}
}
&.has-image {
.content-inner:not(.forwarded-message) & {
margin: 0.5rem -0.5rem -0.375rem;

View File

@ -96,7 +96,7 @@ const Invoice: FC<OwnProps> = ({
<p className="title">{renderText(title)}</p>
)}
{description && (
<div>{renderText(description, ['emoji', 'br'])}</div>
<div className="info">{renderText(description, ['emoji', 'br'])}</div>
)}
<div className={`description ${photo ? 'has-image' : ''}`}>
{Boolean(photo) && (

View File

@ -91,7 +91,7 @@
.media.no-footer &,
.Message .custom-shape &,
.Message .invoice:not(.has-reactions) & {
.Message .invoice:not(.has-reactions).has-photo & {
--color-accent-own: white;
--color-accent: white;
color: white !important;
@ -108,7 +108,7 @@
}
.media.no-footer &,
.Message .invoice:not(.has-reactions) & {
.Message .invoice:not(.has-reactions).has-photo & {
background: rgba(0, 0, 0, 0.2);
}

View File

@ -148,6 +148,10 @@ export function buildContentClassName(
classNames.push('invoice');
}
if (invoice && invoice.photo) {
classNames.push('has-photo');
}
if (storyData) {
classNames.push('story');
}