| | |
| | | > |
| | | <PortalToFollowElemTrigger onClick={() => handleOpenFontSizeSelector(!fontSizeSelectorShow)}> |
| | | <div className={cn( |
| | | 'flex h-8 cursor-pointer items-center rounded-md pl-2 pr-1.5 text-[13px] font-medium text-text-tertiary hover:bg-state-base-hover hover:text-text-secondary', |
| | | 'flex items-center pl-2 pr-1.5 h-8 rounded-md text-[13px] font-medium text-text-tertiary hover:text-text-secondary cursor-pointer hover:bg-state-base-hover', |
| | | fontSizeSelectorShow && 'bg-state-base-hover text-text-secondary', |
| | | )}> |
| | | <RiFontSize className='mr-1 h-4 w-4' /> |
| | | <RiFontSize className='mr-1 w-4 h-4' /> |
| | | {FONT_SIZE_LIST.find(font => font.key === fontSize)?.value || t('workflow.nodes.note.editor.small')} |
| | | </div> |
| | | </PortalToFollowElemTrigger> |
| | | <PortalToFollowElemContent> |
| | | <div className='w-[120px] rounded-md border-[0.5px] border-components-panel-border bg-components-panel-bg-blur p-1 text-text-secondary shadow-xl'> |
| | | <div className='p-1 w-[120px] bg-components-panel-bg-blur border-[0.5px] border-components-panel-border rounded-md shadow-xl text-text-secondary'> |
| | | { |
| | | FONT_SIZE_LIST.map(font => ( |
| | | <div |
| | | key={font.key} |
| | | className='flex h-8 cursor-pointer items-center justify-between rounded-md pl-3 pr-2 hover:bg-state-base-hover' |
| | | className='flex items-center justify-between pl-3 pr-2 h-8 rounded-md cursor-pointer hover:bg-state-base-hover' |
| | | onClick={(e) => { |
| | | e.stopPropagation() |
| | | handleFontSize(font.key) |
| | |
| | | </div> |
| | | { |
| | | fontSize === font.key && ( |
| | | <Check className='h-4 w-4 text-text-accent' /> |
| | | <Check className='w-4 h-4 text-text-accent' /> |
| | | ) |
| | | } |
| | | </div> |