| 
									
										
										
										
											2025-04-24 15:32:04 +08:00
										 |  |  | import { useTranslation } from 'react-i18next' | 
					
						
							|  |  |  | import { Notion } from '../icons/src/public/common' | 
					
						
							|  |  |  | import { Icon3Dots } from '../icons/src/vender/line/others' | 
					
						
							|  |  |  | import Button from '../button' | 
					
						
							| 
									
										
										
										
											2025-04-24 21:26:54 +08:00
										 |  |  | import React from 'react' | 
					
						
							| 
									
										
										
										
											2025-04-24 15:32:04 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | type NotionConnectorProps = { | 
					
						
							|  |  |  |   onSetting: () => void | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-04-24 21:26:54 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | const NotionConnector = ({ onSetting }: NotionConnectorProps) => { | 
					
						
							| 
									
										
										
										
											2025-04-24 15:32:04 +08:00
										 |  |  |   const { t } = useTranslation() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return ( | 
					
						
							|  |  |  |     <div className='flex flex-col items-start rounded-2xl bg-workflow-process-bg p-6'> | 
					
						
							|  |  |  |       <div className='mb-2 h-12 w-12 rounded-[10px] border-[0.5px] border-components-card-border p-3 shadow-lg shadow-shadow-shadow-5'> | 
					
						
							|  |  |  |         <Notion className='size-6' /> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |       <div className='mb-1 flex flex-col gap-y-1 pb-3 pt-1'> | 
					
						
							|  |  |  |         <span className='system-md-semibold text-text-secondary'> | 
					
						
							|  |  |  |           {t('datasetCreation.stepOne.notionSyncTitle')} | 
					
						
							|  |  |  |           <Icon3Dots className='relative -left-1.5 -top-2.5 inline h-4 w-4 text-text-secondary' /> | 
					
						
							|  |  |  |         </span> | 
					
						
							|  |  |  |         <div className='system-sm-regular text-text-tertiary'>{t('datasetCreation.stepOne.notionSyncTip')}</div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |       <Button className='h-8' variant='primary' onClick={onSetting}>{t('datasetCreation.stepOne.connect')}</Button> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |   ) | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-04-24 21:26:54 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export default React.memo(NotionConnector) |