-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix message sharing not working * Fix disconnect notice showing at wrong time * Add notification recipient * Integrate targetAcc * Add tooltip for notification recipient * Adjust paddings * Add event for opening tg message modal * Add message modal stories
- Loading branch information
1 parent
ecedb19
commit 5bcf758
Showing
11 changed files
with
183 additions
and
58 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { useState } from 'react' | ||
import Button from '../Button' | ||
import MessageModal, { MessageModalProps } from './MessageModal' | ||
|
||
function MessageModalWrapper( | ||
props: Omit<MessageModalProps, 'isOpen' | 'closeModal'> | ||
) { | ||
const [isOpen, setIsOpen] = useState(false) | ||
|
||
return ( | ||
<> | ||
<Button onClick={() => setIsOpen(true)}>Open Modal</Button> | ||
<MessageModal | ||
{...props} | ||
isOpen={isOpen} | ||
closeModal={() => setIsOpen(false)} | ||
/> | ||
</> | ||
) | ||
} | ||
|
||
const meta = { | ||
title: 'Components/MessageModal', | ||
component: MessageModalWrapper, | ||
tags: ['autodocs'], | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
args: { | ||
hubId: '1001', | ||
messageId: '7687', | ||
scrollToMessage: async (messageId) => { | ||
alert('Scroll to message: ' + messageId) | ||
}, | ||
}, | ||
} satisfies Meta<typeof MessageModalWrapper> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
} | ||
|
||
export const WithTargetAccount: Story = { | ||
args: { | ||
recipient: '3szaLms2V18XCr2ztvjzcPF16BxvbGeAW4fEG2yeb19XGdGV', | ||
}, | ||
} |
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
Oops, something went wrong.