Support for local deletes synced to all your devices
This commit is contained in:
parent
06f71a7ef8
commit
11eb1782a7
39 changed files with 2094 additions and 72 deletions
|
@ -46,6 +46,10 @@ const commonProps = {
|
|||
|
||||
i18n,
|
||||
|
||||
localDeleteWarningShown: true,
|
||||
isDeleteSyncSendEnabled: true,
|
||||
setLocalDeleteWarningShown: action('setLocalDeleteWarningShown'),
|
||||
|
||||
onConversationAccept: action('onConversationAccept'),
|
||||
onConversationArchive: action('onConversationArchive'),
|
||||
onConversationBlock: action('onConversationBlock'),
|
||||
|
@ -412,3 +416,32 @@ export function Unaccepted(): JSX.Element {
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function NeedsDeleteConfirmation(): JSX.Element {
|
||||
const [localDeleteWarningShown, setLocalDeleteWarningShown] =
|
||||
React.useState(false);
|
||||
const props = {
|
||||
...commonProps,
|
||||
conversation: getDefaultConversation(),
|
||||
localDeleteWarningShown,
|
||||
setLocalDeleteWarningShown: () => setLocalDeleteWarningShown(true),
|
||||
};
|
||||
const theme = useContext(StorybookThemeContext);
|
||||
|
||||
return <ConversationHeader {...props} theme={theme} />;
|
||||
}
|
||||
|
||||
export function NeedsDeleteConfirmationButNotEnabled(): JSX.Element {
|
||||
const [localDeleteWarningShown, setLocalDeleteWarningShown] =
|
||||
React.useState(false);
|
||||
const props = {
|
||||
...commonProps,
|
||||
conversation: getDefaultConversation(),
|
||||
localDeleteWarningShown,
|
||||
isDeleteSyncSendEnabled: false,
|
||||
setLocalDeleteWarningShown: () => setLocalDeleteWarningShown(true),
|
||||
};
|
||||
const theme = useContext(StorybookThemeContext);
|
||||
|
||||
return <ConversationHeader {...props} theme={theme} />;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue