| 
									
										
										
										
											2023-01-12 15:33:22 -08:00
										 |  |  | // Copyright 2023 Signal Messenger, LLC
 | 
					
						
							|  |  |  | // SPDX-License-Identifier: AGPL-3.0-only
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import * as React from 'react'; | 
					
						
							| 
									
										
										
										
											2023-10-11 12:06:43 -07:00
										 |  |  | import type { Meta } from '@storybook/react'; | 
					
						
							|  |  |  | import type { PropsType } from './SystemMessage'; | 
					
						
							| 
									
										
										
										
											2023-01-12 15:33:22 -08:00
										 |  |  | import { SystemMessage, SystemMessageKind } from './SystemMessage'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default { | 
					
						
							|  |  |  |   title: 'Components/Conversation/SystemMessage', | 
					
						
							| 
									
										
										
										
											2023-10-11 12:06:43 -07:00
										 |  |  | } satisfies Meta<PropsType>; | 
					
						
							| 
									
										
										
										
											2023-01-12 15:33:22 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export function PlainSystemMessage(): JSX.Element { | 
					
						
							|  |  |  |   return ( | 
					
						
							|  |  |  |     <SystemMessage | 
					
						
							|  |  |  |       icon="audio-incoming" | 
					
						
							|  |  |  |       contents="Some nice text" | 
					
						
							|  |  |  |       kind={SystemMessageKind.Normal} | 
					
						
							|  |  |  |     /> | 
					
						
							|  |  |  |   ); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export function DangerSystemMessage(): JSX.Element { | 
					
						
							|  |  |  |   return ( | 
					
						
							|  |  |  |     <SystemMessage | 
					
						
							|  |  |  |       icon="audio-missed" | 
					
						
							|  |  |  |       contents="Some loud danger text" | 
					
						
							|  |  |  |       kind={SystemMessageKind.Danger} | 
					
						
							|  |  |  |     /> | 
					
						
							|  |  |  |   ); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export function ErrorSystemMessage(): JSX.Element { | 
					
						
							|  |  |  |   return ( | 
					
						
							|  |  |  |     <SystemMessage | 
					
						
							|  |  |  |       icon="unsupported" | 
					
						
							|  |  |  |       contents="Some error text" | 
					
						
							|  |  |  |       kind={SystemMessageKind.Error} | 
					
						
							|  |  |  |     /> | 
					
						
							|  |  |  |   ); | 
					
						
							|  |  |  | } |