Skip to content

Commit

Permalink
refactor: avatar style λΆ„γ„Ή
Browse files Browse the repository at this point in the history
  • Loading branch information
Todari committed Oct 23, 2024
1 parent b4360ae commit 0eecb95
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
17 changes: 17 additions & 0 deletions client/src/pages/MainPage/Section/CreatorSection/Avatar.style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {css} from '@emotion/react';

export const avatarStyle = css({
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: '0.5rem',
'@media (min-width: 1200px)': {
gap: '1rem',
},
});

export const avatarImageStyle = css({
width: '100%',
height: '100%',
borderRadius: '25%',
});
23 changes: 3 additions & 20 deletions client/src/pages/MainPage/Section/CreatorSection/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {css} from '@emotion/react';

import {Text} from '@components/Design';

Check failure on line 3 in client/src/pages/MainPage/Section/CreatorSection/Avatar.tsx

View workflow job for this annotation

GitHub Actions / test

There should be at least one empty line between import groups
import {avatarImageStyle, avatarStyle} from './Avatar.style';

interface Props {
imagePath: string;
Expand All @@ -10,26 +11,8 @@ interface Props {

const Avatar = ({imagePath, name, onClick}: Props) => {
return (
<button
onClick={onClick}
css={css({
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: '0.5rem',
'@media (min-width: 1200px)': {
gap: '1rem',
},
})}
>
<img
src={`${process.env.IMAGE_URL}/${imagePath}.png`}
css={css({
width: '100%',
height: '100%',
borderRadius: '25%',
})}
/>
<button onClick={onClick} css={avatarStyle}>
<img src={`${process.env.IMAGE_URL}/${imagePath}.png`} css={avatarImageStyle} />
<Text size="bodyBold" textColor="white" responsive={true}>
{name}
</Text>
Expand Down

0 comments on commit 0eecb95

Please sign in to comment.