From a921f267f5ae47355b9b404f6b7d79ea16665ccc Mon Sep 17 00:00:00 2001 From: Alvaro <110414366+alvaro-signal@users.noreply.github.com> Date: Mon, 26 Sep 2022 13:12:51 -0600 Subject: [PATCH] Fixed Avatar storyRing and blur on storybook --- ts/components/Avatar.stories.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ts/components/Avatar.stories.tsx b/ts/components/Avatar.stories.tsx index 8a6c47587..75768d592 100644 --- a/ts/components/Avatar.stories.tsx +++ b/ts/components/Avatar.stories.tsx @@ -42,8 +42,9 @@ export default { }, blur: { control: { type: 'radio' }, - defaultValue: AvatarBlur.NoBlur, + defaultValue: undefined, options: { + Undefined: undefined, NoBlur: AvatarBlur.NoBlur, BlurPicture: AvatarBlur.BlurPicture, BlurPictureWithClickToView: AvatarBlur.BlurPictureWithClickToView, @@ -79,7 +80,7 @@ const createProps = (overrideProps: Partial = {}): Props => ({ : true, avatarPath: overrideProps.avatarPath || '', badge: overrideProps.badge, - blur: overrideProps.blur || AvatarBlur.NoBlur, + blur: overrideProps.blur, color: overrideProps.color || AvatarColors[0], conversationType: overrideProps.conversationType || 'direct', i18n, @@ -95,6 +96,7 @@ const createProps = (overrideProps: Partial = {}): Props => ({ size: 80, title: overrideProps.title || '', theme: overrideProps.theme || ThemeType.light, + storyRing: overrideProps.storyRing, }); const sizes = Object.values(AvatarSize).filter( @@ -238,6 +240,7 @@ BlurredBasedOnProps.args = createProps({ acceptedMessageRequest: false, avatarPath: '/fixtures/kitten-3-64-64.jpg', }); + BlurredBasedOnProps.story = { name: 'Blurred based on props', };