Skip to content

Commit

Permalink
feat: TET-904 fix MetricsCard
Browse files Browse the repository at this point in the history
  • Loading branch information
karolinaszarek committed Sep 3, 2024
1 parent 230c309 commit 5d95422
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 323 deletions.
14 changes: 0 additions & 14 deletions src/components/Metrics Card/MetricsCard.props.ts

This file was deleted.

58 changes: 0 additions & 58 deletions src/components/Metrics Card/MetricsCard.stories.tsx

This file was deleted.

75 changes: 0 additions & 75 deletions src/components/Metrics Card/MetricsCard.styles.ts

This file was deleted.

57 changes: 0 additions & 57 deletions src/components/Metrics Card/MetricsCard.test.tsx

This file was deleted.

69 changes: 0 additions & 69 deletions src/components/Metrics Card/MetricsCard.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/Metrics Card/index.ts

This file was deleted.

30 changes: 0 additions & 30 deletions src/components/Metrics Card/stylesBuilder.ts

This file was deleted.

5 changes: 2 additions & 3 deletions src/components/MetricsCard/MetricsCard.props.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { IconPositionType, MetricsCardConfig } from './MetricsCard.styles';
import { MetricsCardConfig } from './MetricsCard.styles';
import { InlineMetricsProps } from '../InlineMetrics';

export type TrendType = 'None' | 'Positive' | 'Negative';
export type IconPositionType = 'Top' | 'Left';
export type IntentType = 'Neutral' | 'Positive' | 'Negative';

export type MetricsCardProps = {
intent?: IntentType;
iconPosition?: IconPositionType;
hasTrend?: boolean;
hasIcon?: boolean;
Expand Down
4 changes: 1 addition & 3 deletions src/components/MetricsCard/MetricsCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ type Story = StoryObj<typeof meta>;

export const Default: Story = {
args: {
intent: 'Positive',
trend: 'Positive',
trendValue: '+24%',
metrics: '$123.12',
Expand All @@ -45,9 +44,8 @@ export const Default: Story = {

export const IconPositionLeft: Story = {
args: {
intent: 'Negative',
trend: 'Negative',
trendValue: '+24%',
trendValue: '-24%',
metrics: '$123.12',
label: 'Total Earnings',
hasIcon: true,
Expand Down
4 changes: 2 additions & 2 deletions src/components/MetricsCard/MetricsCard.styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { BaseProps } from '@/types/BaseProps';
import type { IconPositionType } from './MetricsCard.props';

export type IconPositionType = 'Top' | 'Left';
import type { BaseProps } from '@/types/BaseProps';

export type MetricsCardConfig = {
iconPosition?: Record<IconPositionType, BaseProps>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/MetricsCard/MetricsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { tet } from '@/tetrisly';
export const MetricsCard: FC<MetricsCardProps & MarginProps> = ({
hasIcon = false,
hasMoreIcon = false,
hasTrend = false,
hasTrend,
metrics,
label,
trend = 'None',
Expand Down
Loading

0 comments on commit 5d95422

Please sign in to comment.