Skip to content

Commit

Permalink
fix: CardTitle to h3, element loader css issue
Browse files Browse the repository at this point in the history
  • Loading branch information
athenachenchen authored and tzuge committed Aug 6, 2021
1 parent 21e8f61 commit a13cea3
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 30 deletions.
6 changes: 3 additions & 3 deletions libs/core-css/src/lib/styles/card/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

.goa-text {
color: $goa-text-color;
font-size: 18px;
font-size: var(--fs-base);
line-height: 28px;
}

.goa-footer {
font-size: 16px;
font-size: var(--fs-base);
}
.goa-title {
font-size: 24px;
font-size: var(--fs-xl);
font-weight: 400;
line-height: 32px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ export const GoAElementLoader = ({
/>
<path
d={getArc(75, 100, radius - 7 / 2, radius, false)}
stroke-width="7"
strokeWidth="7"
stroke={`${spinnerColour}`}
stroke-linecap="round"
strokeLinecap="round"
/>
</svg>
)
Expand Down
4 changes: 2 additions & 2 deletions libs/react-components/src/lib/card/card.component.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { CSSProperties, FC, ReactNode, useEffect, useRef, useState } from 'react';
import React, { FC, ReactNode, useState } from 'react';
import '../../theme.scss';
import './card.scss';

Expand Down Expand Up @@ -48,7 +48,7 @@ export const GoACard: FC<Props> = ({
<div className="goa-title" data-testid='card-title'>
{titleUrl
? <a href={titleUrl} data-testid='card-title-link'>{title}</a>
: <h1>{title}</h1>
: <h3>{title}</h3>
}
</div>
<p className="goa-text" data-testid='card-content'>{content ?? description}</p>
Expand Down
17 changes: 17 additions & 0 deletions libs/react-components/src/lib/card/card.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,23 @@ export const skeletonTemplate = (args) => {
</Story>
</Canvas>

### Plain Text Title

<Canvas>
<Story
name="PlainTextTitle"
height="400px"
args={{
title: 'Energy Diversification Act',
description:
'We are encouraging companies to turn out oil and gas resources into more valuable.',
cardWidth: 'auto',
}}
>
{Template.bind({})}
</Story>
</Canvas>

## Examples

### Basic
Expand Down
70 changes: 47 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a13cea3

Please sign in to comment.