2022-12-08 12:14:18 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { css, Global } from '@emotion/react';
|
2024-04-06 16:11:17 +08:00
|
|
|
import { useTheme } from 'antd-style';
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2024-04-06 16:11:17 +08:00
|
|
|
export default () => {
|
|
|
|
const token = useTheme();
|
|
|
|
return (
|
|
|
|
<Global
|
|
|
|
styles={css`
|
|
|
|
h1,
|
|
|
|
h2,
|
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
h6 {
|
|
|
|
> a[aria-hidden]:first-child {
|
|
|
|
float: left;
|
|
|
|
width: 20px;
|
|
|
|
padding-inline-end: ${token.paddingXXS}px;
|
|
|
|
font-size: 0;
|
|
|
|
line-height: inherit;
|
|
|
|
text-align: right;
|
|
|
|
padding-inline-end: ${token.paddingXXS}px;
|
|
|
|
margin-inline-start: -${token.marginLG}px;
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2024-04-06 16:11:17 +08:00
|
|
|
[data-direction='rtl'] & {
|
|
|
|
float: right;
|
|
|
|
}
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2024-04-06 16:11:17 +08:00
|
|
|
&:hover {
|
|
|
|
border: 0;
|
|
|
|
}
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2024-04-06 16:11:17 +08:00
|
|
|
> .icon-link::before {
|
|
|
|
font-size: ${token.fontSizeXL}px;
|
|
|
|
content: '#';
|
|
|
|
}
|
2022-12-19 13:23:28 +08:00
|
|
|
}
|
2022-12-08 12:14:18 +08:00
|
|
|
|
2024-04-06 16:11:17 +08:00
|
|
|
&:not(:hover) > a[aria-hidden]:first-child > .icon-link {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
2022-12-19 13:23:28 +08:00
|
|
|
}
|
2024-04-06 16:11:17 +08:00
|
|
|
`}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|