mirror of
				https://github.com/langgenius/dify.git
				synced 2025-11-04 04:43:09 +00:00 
			
		
		
		
	
		
			
	
	
		
			24 lines
		
	
	
		
			574 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			24 lines
		
	
	
		
			574 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| 
								 | 
							
								'use client'
							 | 
						||
| 
								 | 
							
								import Drawer from '@/app/components/base/drawer'
							 | 
						||
| 
								 | 
							
								import type { IDrawerProps } from '@/app/components/base/drawer'
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								type IFloatRightContainerProps = {
							 | 
						||
| 
								 | 
							
								  isMobile: boolean
							 | 
						||
| 
								 | 
							
								  children?: React.ReactNode
							 | 
						||
| 
								 | 
							
								} & IDrawerProps
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								const FloatRightContainer = ({ isMobile, children, isOpen, ...drawerProps }: IFloatRightContainerProps) => {
							 | 
						||
| 
								 | 
							
								  return (
							 | 
						||
| 
								 | 
							
								    <>
							 | 
						||
| 
								 | 
							
								      {isMobile && (
							 | 
						||
| 
								 | 
							
								        <Drawer isOpen={isOpen} {...drawerProps}>{children}</Drawer>
							 | 
						||
| 
								 | 
							
								      )}
							 | 
						||
| 
								 | 
							
								      {(!isMobile && isOpen) && (
							 | 
						||
| 
								 | 
							
								        <>{children}</>
							 | 
						||
| 
								 | 
							
								      )}
							 | 
						||
| 
								 | 
							
								    </>
							 | 
						||
| 
								 | 
							
								  )
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								export default FloatRightContainer
							 |