Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonnetangsu committed Mar 8, 2024
1 parent a1ba733 commit 7df2e00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions components/DataCard/DataCard.styles.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { cnb } from 'cnbuilder';

export const animateWrapper = 'h-full';
// Use border-black-50/50 which works well on both light and dark backgrounds
export const root = 'relative overflow-hidden size-full break-words border-l-2 border-black-50/50';

export const flex = 'h-full';
export const content = (
hasBarColor?: boolean,
) => cnb('rs-pl-2', {
Expand Down
5 changes: 2 additions & 3 deletions components/DataCard/DataCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,18 @@ export const DataCard = ({
className,
...props
}: DataCardProps) => {
// const numberToAnimate = parseFloat(heading?.match(/\d+/)[0]);
const headingProcessed = isCounter ? splitNumberString(heading) : undefined;

return (
<AnimateInView animation={animation} delay={delay} className="h-full">
<AnimateInView animation={animation} delay={delay} className={styles.animateWrapper}>
<Container
as="article"
width="full"
pt={paddingTop}
className={styles.root}
{...props}
>
<FlexBox direction="col" className="h-full">
<FlexBox direction="col" className={styles.flex}>
{heading && (
<Heading
as={headingLevel}
Expand Down

0 comments on commit 7df2e00

Please sign in to comment.