-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bbe859
commit 6b290a0
Showing
29 changed files
with
627 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...omponents/conversation/conversation-details/ConversationNotificationsSettings.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2021 Signal Messenger, LLC | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
import * as React from 'react'; | ||
|
||
import { storiesOf } from '@storybook/react'; | ||
import { action } from '@storybook/addon-actions'; | ||
|
||
import { setup as setupI18n } from '../../../../js/modules/i18n'; | ||
import enMessages from '../../../../_locales/en/messages.json'; | ||
import { ConversationNotificationsSettings } from './ConversationNotificationsSettings'; | ||
|
||
const i18n = setupI18n('en', enMessages); | ||
|
||
const story = storiesOf( | ||
'Components/Conversation/ConversationDetails/ConversationNotificationsSettings', | ||
module | ||
); | ||
|
||
const getCommonProps = () => ({ | ||
muteExpiresAt: undefined, | ||
conversationType: 'group' as const, | ||
dontNotifyForMentionsIfMuted: false, | ||
i18n, | ||
setDontNotifyForMentionsIfMuted: action('setDontNotifyForMentionsIfMuted'), | ||
setMuteExpiration: action('setMuteExpiration'), | ||
}); | ||
|
||
story.add('Group conversation, all default', () => ( | ||
<ConversationNotificationsSettings {...getCommonProps()} /> | ||
)); | ||
|
||
story.add('Group conversation, muted', () => ( | ||
<ConversationNotificationsSettings | ||
{...getCommonProps()} | ||
muteExpiresAt={Date.UTC(2099, 5, 9)} | ||
/> | ||
)); | ||
|
||
story.add('Group conversation, @mentions muted', () => ( | ||
<ConversationNotificationsSettings | ||
{...getCommonProps()} | ||
dontNotifyForMentionsIfMuted | ||
/> | ||
)); |
Oops, something went wrong.