Skip to content

Commit b6ee8a7

Browse files
authored
fix: Update ActorCard and ActorSearch components for consistent styling (#505)
refactor: Update ActorCard and ActorSearch components for consistent styling - Increased border-radius from 8 to 12 in ActorCard and ActorSearchDetail - Adjusted spacing in ActorSearch for consistency. - Added ActorAvatarWrapper to encapsulate the ActorAvatar componen
1 parent 5e97203 commit b6ee8a7

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

src/web/src/components/actor/ActorCard.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const Container = styled(Box)<{ $withBorder: boolean }>`
1818
display: flex;
1919
flex-direction: column;
2020
gap: ${theme.space.space8};
21-
border-radius: ${theme.radius.radius8};
21+
border-radius: ${theme.radius.radius12};
2222
border: ${props => props.$withBorder ? `1px solid ${theme.color.neutral.separatorSubtle}` : 'none'};
2323
2424
.clampToOneLine {
@@ -73,6 +73,13 @@ const ActorTitleWrapper = styled.div`
7373
gap: ${theme.space.space2};
7474
`;
7575

76+
const ActorAvatarWrapper = styled.div`
77+
border: 1px solid ${theme.color.neutral.separatorSubtle};
78+
border-radius: ${theme.radius.radius8};
79+
overflow: hidden;
80+
flex-shrink: 0;
81+
`;
82+
7683
type StatProps = {
7784
icon: React.JSX.Element
7885
value: string
@@ -173,7 +180,9 @@ export const ActorCard: React.FC<ActorCardProps> = ({
173180
<BoxRow>
174181
<ActorHeaderWithActionButton>
175182
<ActorHeader>
176-
<ActorAvatar size={40} name={actor.title} url={actor.pictureUrl} />
183+
<ActorAvatarWrapper>
184+
<ActorAvatar size={40} name={actor.title} url={actor.pictureUrl} />
185+
</ActorAvatarWrapper>
177186
<ActorTitleWrapper>
178187
<Text as="h3" weight="bold" color={theme.color.neutral.text} className="clampToOneLine" >{actor.title}</Text>
179188
<BoxRow>

src/web/src/pages/ActorSearch/ActorSearch.skeleton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const Container = styled(Box)`
88
display: flex;
99
flex-direction: column;
1010
gap: ${theme.space.space8};
11-
border-radius: ${theme.radius.radius8};
11+
border-radius: ${theme.radius.radius12};
1212
border: 1px solid ${theme.color.neutral.separatorSubtle};
1313
`;
1414

@@ -81,7 +81,7 @@ const ActorListItemSkeleton: React.FC<ActorListItemSkeletonProps> = () => {
8181
const ResultsContainer = styled(Box)`
8282
display: flex;
8383
flex-direction: column;
84-
gap: ${theme.space.space12};
84+
gap: ${theme.space.space8};
8585
width: 100%;
8686
`;
8787

@@ -105,7 +105,7 @@ const DetailContainer = styled(Box)`
105105

106106
const CardWrapper = styled(Box)`
107107
background: ${theme.color.neutral.background};
108-
border-radius: ${theme.radius.radius8};
108+
border-radius: ${theme.radius.radius12};
109109
border: 1px solid ${theme.color.neutral.separatorSubtle};
110110
display: flex;
111111
flex-direction: column;

src/web/src/pages/ActorSearch/ActorSearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const ActorSearch: React.FC = () => {
6363
<EmptyState title="No actors found" description="Try a different search query" />
6464
) : (
6565
actors.map((actor: Actor) => (
66-
<ActorContainer key={actor.id} mb="space12">
66+
<ActorContainer key={actor.id} mb="space8">
6767
<ActorCard actor={actor} />
6868
</ActorContainer>
6969
))

src/web/src/pages/ActorSearch/ActorSearchDetail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const Container = styled(Box)`
2626
height: 100%;
2727
overflow: auto;
2828
background: ${theme.color.neutral.background};
29-
border-radius: ${theme.radius.radius8};
29+
border-radius: ${theme.radius.radius12};
3030
border: 1px solid ${theme.color.neutral.separatorSubtle};
3131
`;
3232

0 commit comments

Comments
 (0)