Skip to content

Commit

Permalink
feat: Operation Button 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
CheeseB committed Mar 27, 2024
1 parent 2581ba9 commit 3bd23d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/commons/buttons/OperationButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ type OperationButtonProps = {

export const OperationButton = ({ type, isDisabled, onClick }: OperationButtonProps) => {
const buttonType = type === 'add' && isDisabled ? 'disabled' : type;
const { url, alt } = SVGS.button[buttonType];
let icon = SVGS.button.disabled;

if (buttonType !== 'disabled') {
icon = SVGS.button[buttonType].active;
}

const { url, alt } = icon;

return (
<button className={cx(`btn-operation-${type}`)} disabled={isDisabled} type='button' onClick={onClick}>
Expand Down

0 comments on commit 3bd23d4

Please sign in to comment.