Skip to content

Commit

Permalink
refactor: adjust aggregate-rating responsive layout
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshift committed Apr 5, 2024
1 parent d996eb4 commit c4a96cc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions src/orgs/components/org-reviews/aggregate-ratings-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,24 @@ export const AggregateRatingsCard = ({

{showInfos && <>{infoTexts}</>}

<div className="grid-cold-1 2xl:grid-cols-3 grid gap-3 sm:grid-cols-2">
<div className="2xl:grid-cols-3 grid grid-cols-1 gap-6 sm:grid-cols-2 md:gap-4">
{ratings.map(([label, rating]) => (
<div
key={label}
className="flex shrink-0 flex-wrap items-center justify-start gap-2"
className="flex shrink-0 flex-col flex-wrap items-start justify-start gap-2 md:flex-row md:items-center"
>
<Text
className="text-base font-bold text-white"
text={rating.toFixed(1)}
/>
<Rating
readOnly
value={rating}
style={{ maxWidth: 120 }}
itemStyles={RATING_ITEM_STYLES}
/>
<div className="flex items-center gap-2">
<Text
className="text-base font-bold text-white"
text={rating.toFixed(1)}
/>
<Rating
readOnly
value={rating}
style={{ maxWidth: 120 }}
itemStyles={RATING_ITEM_STYLES}
/>
</div>

<Text
className="shrink-0 text-base text-white"
Expand Down
2 changes: 1 addition & 1 deletion src/orgs/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const ORG_RATING_LABELS = {
careerGrowth: 'Career Growth' as const,
diversityInclusion: 'Diversity & Inclusion' as const,
management: 'Management' as const,
product: 'Product' as const,
product: 'Overall Product' as const,
compensation: 'Compensation' as const,
onboarding: 'Onboarding' as const,
workLifeBalance: 'Work Life Balance' as const,
Expand Down

0 comments on commit c4a96cc

Please sign in to comment.