Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sungik-choi committed Dec 18, 2024
1 parent 9cfbee0 commit 025d6a2
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ import { forwardRef } from 'react'
import { isBezierIcon } from '@channel.io/bezier-icons'
import classNames from 'classnames'

import { AlphaIcon } from '~/src/components/AlphaIcon'
import { type AlphaIconButtonProps } from '~/src/components/AlphaIconButton'
import { AlphaLoader } from '~/src/components/AlphaLoader'
import { BaseButton } from '~/src/components/BaseButton'
import { type ButtonSize } from '~/src/components/Button'
import { Icon } from '~/src/components/Icon'

import styles from './IconButton.module.scss'

function getIconSize(size: ButtonSize) {
return (
{
xs: 'xs',
s: 'xs',
m: 's',
l: 's',
xl: 'm',
xs: '16',
s: '16',
m: '20',
l: '20',
xl: '24',
} as const
)[size]
}
Expand Down Expand Up @@ -68,7 +68,7 @@ export const IconButton = forwardRef<HTMLButtonElement, AlphaIconButtonProps>(
)}
>
{isBezierIcon(content) ? (
<Icon
<AlphaIcon

Check warning on line 71 in packages/bezier-react/src/components/AlphaIconButton/IconButton.tsx

View check run for this annotation

Codecov / codecov/patch

packages/bezier-react/src/components/AlphaIconButton/IconButton.tsx#L71

Added line #L71 was not covered by tests
size={getIconSize(size)}
source={content}
className={styles.ButtonIcon}
Expand All @@ -83,7 +83,7 @@ export const IconButton = forwardRef<HTMLButtonElement, AlphaIconButtonProps>(
className={classNames(
styles.ButtonLoader,
// NOTE: Loader size is the same as icon size
styles[`size-${getIconSize(size)}`]
styles[`size-${size}`]
)}
>
<AlphaLoader
Expand Down

0 comments on commit 025d6a2

Please sign in to comment.