Skip to content

Commit

Permalink
Merge pull request #11 from rhocode/component/itemButton
Browse files Browse the repository at this point in the history
Add a component item button
  • Loading branch information
Tiffany-Chien authored Dec 2, 2023
2 parents 2cd6f99 + 520d297 commit 55d42c1
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/app/_components/itemButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { Box, Button, Flex, Icon } from "@chakra-ui/react";

interface CircleIconProps {
boxSize: number;
}

// This is just a placeholder
const CircleIcon = (props: CircleIconProps) => (
<Icon viewBox="0 0 200 200" {...props}>
<path
fill="currentColor"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
</Icon>
);

export default async function ItemButton() {
return (
<Flex>
<Box
position="relative"
display="inline-flex"
alignItems="center"
padding="10px 24px"
w="100%"
>
<Button
aria-label="item button"
colorScheme="gray"
size="md"
w="100%"
textAlign="left"
borderRadius="8px"
justifyContent="flex-start"
fontWeight="normal"
></Button>
<Box
position="absolute"
left="10px"
top="50%"
transform="translateY(-50%)"
>
<CircleIcon boxSize={7} />
</Box>
</Box>
</Flex>
);
}

1 comment on commit 55d42c1

@vercel
Copy link

@vercel vercel bot commented on 55d42c1 Dec 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.