Skip to content

Commit

Permalink
OV-50: * update user card and extract user circle component
Browse files Browse the repository at this point in the history
  • Loading branch information
JKaypa committed Aug 22, 2024
1 parent ca68a7c commit 423aed2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
1 change: 1 addition & 0 deletions frontend/src/bundles/users/components/components.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { UserCircle } from './user-card/components/user-circle.js';
export { UserCard } from './user-card/user-card.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Circle } from '~/bundles/common/components/components.js';

type Properties = {
username: string;
};

const UserCircle: React.FC<Properties> = ({ username }) => {
return (
<Circle
size="40px"
border="2px solid"
borderColor="brand.secondary.900"
color="brand.secondary.900"
>
{username}
</Circle>
);
};

export { UserCircle };
11 changes: 3 additions & 8 deletions frontend/src/bundles/users/components/user-card/user-card.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import {
Button,
Circle,
Flex,
Text,
VStack,
} from '~/bundles/common/components/components.js';

import { UserCircle } from '../components.js';

const UserCard: React.FC = () => (
<VStack rounded="lg" bg="background.600" spacing="10px" p="15px 5px 10px">
<Flex
Expand All @@ -16,13 +17,7 @@ const UserCard: React.FC = () => (
pl="10px"
>
{/* TODO: replace Circle and Text content with dynamic values */}
<Circle
size="40px"
border="2px solid"
borderColor="brand.secondary.900"
>
FN
</Circle>
<UserCircle username="FN" />
<Text>Firstname Lastname</Text>
</Flex>
<Button label="Create video" />
Expand Down

0 comments on commit 423aed2

Please sign in to comment.