Skip to content

Commit

Permalink
feat: IconBox 컴포넌트에 cursor라는 속성 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
llddang committed Jan 12, 2025
1 parent 4f73200 commit 064aaef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/IconBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { Flex, IconButton, Text } from '@chakra-ui/react';

import { IconBoxProps } from './type';

const IconBox = ({ leftIcon, content, rightIcon, handleClick }: IconBoxProps) => {
const IconBox = ({ leftIcon, content, rightIcon, handleClick, cursor = 'default' }: IconBoxProps) => {
return (
<Flex align="center" gap="1" w="100%" h="40px" minH="40px" color="white" bg="orange_light" borderRadius="2xl">
<IconButton as="div" flexShrink="0" aria-label="" icon={leftIcon} size="icon_md" variant="transparent" />
<Text textStyle="bold_md" flex="auto" cursor="default" isTruncated>
<Text textStyle="bold_md" flex="auto" cursor={cursor} isTruncated>
{content}
</Text>
{rightIcon && (
Expand Down
1 change: 1 addition & 0 deletions src/components/IconBox/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export interface IconBoxProps {
content: string;
rightIcon?: React.ReactElement;
handleClick?: () => void;
cursor?: React.CSSProperties['cursor'];
}

0 comments on commit 064aaef

Please sign in to comment.