mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 11:59:51 +08:00
fix: double link icon size error
This commit is contained in:
@@ -3,6 +3,7 @@ import React, { useCallback } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Descendant } from 'slate';
|
||||
import { RenderElementProps } from 'slate-react';
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
|
||||
export type DoubleLinkElement = {
|
||||
type: 'link';
|
||||
@@ -13,6 +14,10 @@ export type DoubleLinkElement = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
const StyledLink = styled('a')({
|
||||
cursor: 'pointer',
|
||||
});
|
||||
|
||||
export const DoubleLinkComponent = (props: RenderElementProps) => {
|
||||
const { attributes, children, element } = props;
|
||||
const doubleLinkElement = element as DoubleLinkElement;
|
||||
@@ -32,15 +37,20 @@ export const DoubleLinkComponent = (props: RenderElementProps) => {
|
||||
|
||||
return (
|
||||
<span onClick={handleClickLinkText}>
|
||||
<a {...attributes} style={{ cursor: 'pointer' }}>
|
||||
<StyledLink {...attributes}>
|
||||
<PagesIcon
|
||||
style={{ verticalAlign: 'middle', height: '20px' }}
|
||||
style={{
|
||||
verticalAlign: 'middle',
|
||||
height: '1em',
|
||||
fontSize: 'inherit',
|
||||
marginBottom: '.2em',
|
||||
}}
|
||||
/>
|
||||
<span>
|
||||
{children}
|
||||
{displayValue}
|
||||
</span>
|
||||
</a>
|
||||
</StyledLink>
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user