Skip to content

Commit

Permalink
Fix issues with tier tile
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgraeme committed Sep 27, 2024
1 parent f935e85 commit 2915d69
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions lib/components/organisms/TierTile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ const TierTile: React.FC<TierTileProps> & {
flexDirection: 'column',
width: isFullSize ? '100%' : 'auto',
},
row: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
},
});

const renderTileContent = () => {
Expand Down Expand Up @@ -80,9 +85,15 @@ const TierTile: React.FC<TierTileProps> & {
<View style={{ padding: 12 }}>
<TierTile.Progress />
<TierTile.Description />
<View style={styles.container}>
<TierTile.Name />
<TierTile.Count />
<View style={styles.row}>
<View>
<TierTile.Name />
<TierTile.Count />
</View>
<View>
<TierTile.NextName />

Check failure on line 94 in lib/components/organisms/TierTile/index.tsx

View workflow job for this annotation

GitHub Actions / publish-storybook

JSX element type 'TierTile.NextName' does not have any construct or call signatures.

Check failure on line 94 in lib/components/organisms/TierTile/index.tsx

View workflow job for this annotation

GitHub Actions / publish-storybook

'TierTile.NextName' cannot be used as a JSX component.
<TierTile.NextCount />

Check failure on line 95 in lib/components/organisms/TierTile/index.tsx

View workflow job for this annotation

GitHub Actions / publish-storybook

JSX element type 'TierTile.NextCount' does not have any construct or call signatures.

Check failure on line 95 in lib/components/organisms/TierTile/index.tsx

View workflow job for this annotation

GitHub Actions / publish-storybook

'TierTile.NextCount' cannot be used as a JSX component.
</View>
</View>
</View>
</>
Expand Down Expand Up @@ -152,7 +163,7 @@ const Count: React.FC = () => {
style={{
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
justifyContent: 'flex-start',
}}
>
<Text variant="tier-earned">{`${tier?.earnedPoints}/`}</Text>
Expand All @@ -165,7 +176,16 @@ const NextCount: React.FC = () => {
const { configuration } = useTileContext();
const { targetTier } = configuration as TierTileConfig;
return (
<Text variant="caption">{`${targetTier?.earnedPoints}/${targetTier?.pointsRequirement}`}</Text>
<View
style={{
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'flex-start',
}}
>
<Text variant="tier-earned">{`${targetTier?.earnedPoints}/`}</Text>
<Text variant="tier-requirement">{targetTier?.pointsRequirement}</Text>
</View>
);
};

Expand Down

0 comments on commit 2915d69

Please sign in to comment.