diff --git a/packages/react-components/src/components/Picker/Picker.spec.tsx b/packages/react-components/src/components/Picker/Picker.spec.tsx index 50af3473a..ae7f7f3b7 100644 --- a/packages/react-components/src/components/Picker/Picker.spec.tsx +++ b/packages/react-components/src/components/Picker/Picker.spec.tsx @@ -3,7 +3,7 @@ import { render, vi } from 'test-utils'; import userEvent from '@testing-library/user-event'; import noop from '../../utils/noop'; import { IPickerProps, Picker, PickerType } from './Picker'; -import { defaultOptions, SELECT_ALL_OPTION_KEY } from './constants'; +import { defaultOptions } from './constants'; // eslint-disable-next-line @typescript-eslint/no-empty-function window.HTMLElement.prototype.scrollIntoView = () => {}; diff --git a/packages/react-components/src/components/Picker/Picker.stories.css b/packages/react-components/src/components/Picker/Picker.stories.css new file mode 100644 index 000000000..dc947d5f2 --- /dev/null +++ b/packages/react-components/src/components/Picker/Picker.stories.css @@ -0,0 +1,31 @@ +.custom-picker-option { + display: flex; + flex-flow: row; + align-items: center; +} + +.image { + margin-right: 15px; + border-radius: 50%; + width: 45px; + height: auto; +} + +.image.selected { + width: 20px; +} + +.title { + font-size: 18px; + font-weight: 700; +} + +.title.selected { + font-size: 14px; + font-weight: 400; +} + +.description { + color: var(--content-subtle); + font-size: 14px; +} diff --git a/packages/react-components/src/components/Picker/Picker.stories.tsx b/packages/react-components/src/components/Picker/Picker.stories.tsx index d0057938d..0c7e2d254 100644 --- a/packages/react-components/src/components/Picker/Picker.stories.tsx +++ b/packages/react-components/src/components/Picker/Picker.stories.tsx @@ -5,6 +5,8 @@ import { IPickerProps, Picker as PickerComponent } from './Picker'; import { defaultExtendedOptions, defaultOptions } from './constants'; import { IPickerListItem } from './PickerList'; +import './Picker.stories.css'; + export default { title: 'Components/Picker', component: PickerComponent, @@ -91,3 +93,129 @@ PickerInMultiselectModeWithSelectedOptions.args = { options: defaultExtendedOptions, selectAllOptionText: 'Select all', }; + +const CustomPickerOption: React.FC = ({ children }) => ( +