diff --git a/packages/react-components/src/components/Avatar/Avatar.stories.tsx b/packages/react-components/src/components/Avatar/Avatar.stories.tsx index 7272513a0..7d2c1f797 100644 --- a/packages/react-components/src/components/Avatar/Avatar.stories.tsx +++ b/packages/react-components/src/components/Avatar/Avatar.stories.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import { Meta } from '@storybook/react'; +import image from '../../stories/assets/avatar.jpg'; import { StoryDescriptor } from '../../stories/components/StoryDescriptor'; import { Avatar, AvatarProps } from './Avatar'; @@ -16,8 +17,6 @@ export const Default = (args: AvatarProps): React.ReactElement => ( ); -const defaultImage = - 'https://cdn-labs.livechat-files.com/api/file/lc/img/100019504/df59da4b5b0cdb6030efb08787fd255d.jpg'; const defaultName = 'John Doe'; Default.args = { @@ -28,7 +27,7 @@ Default.args = { export const Types = (): React.ReactElement => ( <> - + @@ -100,10 +99,10 @@ export const FallbackAvatar = (): React.ReactElement => ( export const Rim = (): React.ReactElement => ( <> - + {' '} - + ); @@ -113,12 +112,7 @@ export const SizesWithStatus = (): React.ReactElement => { <> {AvatarSizes.map((size) => ( - + { <> {AvatarSizes.map((size) => ( - + ( Default.args = { title: 'Card title', - src: 'https://via.placeholder.com/100', + src: image, alt: 'Image description', children: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore', @@ -35,7 +36,7 @@ export const Expandable = (): React.ReactElement => ( Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod @@ -47,7 +48,7 @@ export const WithButtons = (): React.ReactElement => ( ( = { @@ -37,21 +39,21 @@ const mockAgents = [ name: 'Alice Johnson 2', email: 'alic2@example.com', status: 'available' as const, - avatar: 'https://via.placeholder.com/150', + avatar: image, isBot: false, }, { name: 'Bob Smith', email: 'bob3@example.com', status: 'unavailable' as const, - avatar: 'https://via.placeholder.com/150', + avatar: image, isBot: false, }, ...[...Array(10)].map((_, index) => ({ name: `Unknown Agent ${index}`, email: `unknown${index}@example.com`, status: 'available' as const, - avatar: 'https://via.placeholder.com/150', + avatar: image, isBot: index % 2 === 0, })), ]; diff --git a/packages/react-components/src/components/Picker/Picker.stories.tsx b/packages/react-components/src/components/Picker/Picker.stories.tsx index 044da5b02..5b472a1d5 100644 --- a/packages/react-components/src/components/Picker/Picker.stories.tsx +++ b/packages/react-components/src/components/Picker/Picker.stories.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import { Meta, StoryFn } from '@storybook/react'; +import image from '../../stories/assets/avatar.jpg'; import { StoryDescriptor } from '../../stories/components/StoryDescriptor'; import { customHeightForChromatic } from '../../utils/chromatic-story-helpers'; import noop from '../../utils/noop'; @@ -171,10 +172,7 @@ export const PickerWithOptionsAsCustomElements = (): React.ReactElement => ( customElement: { listItemBody: ( - +
Example custom element one
Example custom element
@@ -183,10 +181,7 @@ export const PickerWithOptionsAsCustomElements = (): React.ReactElement => ( ), selectedItemBody: ( - +
Example custom element one
@@ -200,10 +195,7 @@ export const PickerWithOptionsAsCustomElements = (): React.ReactElement => ( customElement: { listItemBody: ( - +
Example custom element two
Example custom element
@@ -212,10 +204,7 @@ export const PickerWithOptionsAsCustomElements = (): React.ReactElement => ( ), selectedItemBody: ( - +
Example custom element two
@@ -236,10 +225,7 @@ export const PickerWithOptionsAsCustomElements = (): React.ReactElement => ( customElement: { listItemBody: ( - +
Example custom element one
Example custom element
@@ -248,10 +234,7 @@ export const PickerWithOptionsAsCustomElements = (): React.ReactElement => ( ), selectedItemBody: ( - +
Example element one
), @@ -263,10 +246,7 @@ export const PickerWithOptionsAsCustomElements = (): React.ReactElement => ( customElement: { listItemBody: ( - +
Example custom element two
Example custom element
@@ -275,10 +255,7 @@ export const PickerWithOptionsAsCustomElements = (): React.ReactElement => ( ), selectedItemBody: ( - +
Example element two
), diff --git a/packages/react-components/src/components/Picker/constants.tsx b/packages/react-components/src/components/Picker/constants.tsx index 1efd7f88c..1450814a0 100644 --- a/packages/react-components/src/components/Picker/constants.tsx +++ b/packages/react-components/src/components/Picker/constants.tsx @@ -1,5 +1,6 @@ import { DayMode } from '@livechat/design-system-icons'; +import image from '../../stories/assets/avatar.jpg'; import { Icon } from '../Icon'; import { TagKind } from '../Tag'; @@ -87,7 +88,7 @@ export const DEFAULT_MORE_PICKER_OPTIONS: IPickerListItem[] = [ { key: 'four', name: 'Option with avatar', - avatarSrc: 'https://avatars2.githubusercontent.com/u/29309941?s=88&v=4', + avatarSrc: image, }, ]; diff --git a/packages/react-components/src/components/Tag/Tag.stories.tsx b/packages/react-components/src/components/Tag/Tag.stories.tsx index 23cf6ddd6..67a82cc03 100644 --- a/packages/react-components/src/components/Tag/Tag.stories.tsx +++ b/packages/react-components/src/components/Tag/Tag.stories.tsx @@ -3,6 +3,7 @@ import * as React from 'react'; import * as TablerIcons from '@livechat/design-system-icons'; import { Meta } from '@storybook/react'; +import image from '../../stories/assets/avatar.jpg'; import { StoryDescriptor } from '../../stories/components/StoryDescriptor'; import noop from '../../utils/noop'; import { Icon } from '../Icon'; @@ -15,9 +16,7 @@ const exampleIcon = ; const exampleAvatar = ( tag-avatar diff --git a/packages/react-components/src/stories/assets/avatar.jpg b/packages/react-components/src/stories/assets/avatar.jpg new file mode 100644 index 000000000..0bb57ea0b Binary files /dev/null and b/packages/react-components/src/stories/assets/avatar.jpg differ diff --git a/packages/react-components/src/stories/assets/folder.svg b/packages/react-components/src/stories/assets/folder.svg new file mode 100644 index 000000000..af77ee207 --- /dev/null +++ b/packages/react-components/src/stories/assets/folder.svg @@ -0,0 +1,5 @@ + + + + +