-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from rhocode/component/itemButton
Add a component item button
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
} |
55d42c1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
redfox – ./
redfox-pcode.vercel.app
redfox-tehalexfs-projects.vercel.app
torbhub.com
www.torbhub.com
redfox-git-main-tehalexfs-projects.vercel.app