Skip to content

Commit

Permalink
Merge pull request #494 from pixiv/mimo/fix-multiselect
Browse files Browse the repository at this point in the history
Replace multiselect icon with icon component
  • Loading branch information
mimokmt authored Mar 25, 2024
2 parents c6a4d6a + 23e4802 commit 062ae3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .storybook/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ const config: TestRunnerConfig = {
customSnapshotIdentifier: context.id,
customDiffDir: `${process.cwd()}/__diff_output__`,
customSnapshotsDir: `${process.cwd()}/__image_snapshots__`,
failureThresholdType: 'percent',
failureThreshold: 0.0001,
})
},
tags: {
Expand Down
9 changes: 9 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ globalThis.ResizeObserver = jest.fn().mockImplementation(() => ({
disconnect: jest.fn(),
}))

global.IntersectionObserver = jest.fn().mockImplementation(() => ({
observe() {
return null
},
disconnect() {
return null
},
}))

window.matchMedia = jest.fn().mockImplementation((query: string) => ({
matches: false,
media: query,
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/components/MultiSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { px } from '@charcoal-ui/utils'

import { MultiSelectGroupContext } from './context'
import { focusVisibleFocusRingCss } from '@charcoal-ui/styled'
import Icon from '../Icon'

export type MultiSelectProps = React.PropsWithChildren<{
value: string
Expand Down Expand Up @@ -76,7 +77,7 @@ const MultiSelect = forwardRef<HTMLInputElement, MultiSelectProps>(
invalid={invalid}
aria-hidden={true}
>
<pixiv-icon name="24/Check" unsafe-non-guideline-scale={16 / 24} />
<Icon name="24/Check" unsafe-non-guideline-scale={16 / 24} />
</MultiSelectInputOverlay>
{Boolean(children) && <MultiSelectLabel>{children}</MultiSelectLabel>}
</MultiSelectRoot>
Expand Down

0 comments on commit 062ae3b

Please sign in to comment.