Display user badges
This commit is contained in:
parent
927c22ef73
commit
f647c4e053
95 changed files with 2891 additions and 424 deletions
|
@ -13,6 +13,7 @@ import { ContactModal } from './ContactModal';
|
|||
import { setupI18n } from '../../util/setupI18n';
|
||||
import enMessages from '../../../_locales/en/messages.json';
|
||||
import type { ConversationType } from '../../state/ducks/conversations';
|
||||
import { getFakeBadges } from '../../test-both/helpers/getFakeBadge';
|
||||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
|
||||
|
@ -28,6 +29,7 @@ const defaultContact: ConversationType = getDefaultConversation({
|
|||
|
||||
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
||||
areWeAdmin: boolean('areWeAdmin', overrideProps.areWeAdmin || false),
|
||||
badges: overrideProps.badges || [],
|
||||
contact: overrideProps.contact || defaultContact,
|
||||
hideContactModal: action('hideContactModal'),
|
||||
i18n,
|
||||
|
@ -86,3 +88,11 @@ story.add('Viewing self', () => {
|
|||
|
||||
return <ContactModal {...props} />;
|
||||
});
|
||||
|
||||
story.add('With badges', () => {
|
||||
const props = createProps({
|
||||
badges: getFakeBadges(2),
|
||||
});
|
||||
|
||||
return <ContactModal {...props} />;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue