Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

style index card title/tag for proper vertical spacing when wrapped #611

Merged
merged 1 commit into from
Oct 9, 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
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ exports[`index-card Basic use as a product card with links renders as expected 1
className="flex flex--center-cross"
>
<h3
className="txt-fancy txt-l mb12"
className="txt-fancy txt-l mb-neg6 flex flex--wrap flex--center-cross mb12"
style={
Object {
"fontSize": 18,
"lineHeight": "18px",
}
}
>
<span
className="mr6"
<div
className="mr6 mb6 txt-nowrap"
>
Mapbox GL JS
</span>
</div>
<div
className="inline-block mr6 relative"
className="inline-block mr6 mb6 relative txt-nowrap"
style={
Object {
"top": -2,
Expand Down Expand Up @@ -192,19 +192,19 @@ exports[`index-card Use as a help section card renders as expected 1`] = `
</svg>
</div>
<h3
className="txt-fancy txt-l"
className="txt-fancy txt-l mb-neg6 flex flex--wrap flex--center-cross"
style={
Object {
"fontSize": 18,
"lineHeight": "18px",
}
}
>
<span
className="mr6"
<div
className="mr6 mb6 txt-nowrap"
>
Tutorials
</span>
</div>
</h3>
</div>
<p
Expand Down
16 changes: 11 additions & 5 deletions src/components/index-card/index-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,23 @@ const CardContent = ({
</div>
)}
<h3
className={classnames('txt-fancy txt-l', {
mb12: !icon
})}
className={classnames(
'txt-fancy txt-l mb-neg6 flex flex--wrap flex--center-cross',
{
mb12: !icon
}
)}
style={{
fontSize: 18,
lineHeight: '18px'
}}
>
<span className="mr6">{title}</span>
<div className="mr6 mb6 txt-nowrap">{title}</div>
{tag && (
<div className="inline-block mr6 relative" style={{ top: -2 }}>
<div
className="inline-block mr6 mb6 relative txt-nowrap"
style={{ top: -2 }}
>
{tag}
</div>
)}
Expand Down
Loading