|
@ -1,10 +1,10 @@ |
|
|
import type { ReactElement } from 'react'; |
|
|
|
|
|
import React, { useMemo } from 'react'; |
|
|
|
|
|
import type { MenuProps } from 'antd'; |
|
|
|
|
|
import type { MenuItemType } from 'antd/es/menu/hooks/useItems'; |
|
|
|
|
|
import { LeftOutlined, RightOutlined } from '@ant-design/icons'; |
|
|
import { LeftOutlined, RightOutlined } from '@ant-design/icons'; |
|
|
|
|
|
import type { MenuProps } from 'antd'; |
|
|
import { createStyles, css } from 'antd-style'; |
|
|
import { createStyles, css } from 'antd-style'; |
|
|
|
|
|
import type { MenuItemType } from 'antd/es/menu/hooks/useItems'; |
|
|
import classNames from 'classnames'; |
|
|
import classNames from 'classnames'; |
|
|
|
|
|
import type { ReactElement } from 'react'; |
|
|
|
|
|
import React, { useMemo } from 'react'; |
|
|
import useMenu from '../../hooks/useMenu'; |
|
|
import useMenu from '../../hooks/useMenu'; |
|
|
|
|
|
|
|
|
const useStyle = createStyles(({ token }) => { |
|
|
const useStyle = createStyles(({ token }) => { |
|
@ -44,15 +44,15 @@ const useStyle = createStyles(({ token }) => { |
|
|
|
|
|
|
|
|
.footer-nav-icon-before { |
|
|
.footer-nav-icon-before { |
|
|
position: relative; |
|
|
position: relative; |
|
|
margin-inline-end: 1em; |
|
|
|
|
|
vertical-align: middle; |
|
|
|
|
|
line-height: 0; |
|
|
line-height: 0; |
|
|
right: 0; |
|
|
vertical-align: middle; |
|
|
transition: right 0.3s; |
|
|
transition: inset-inline-end 0.3s; |
|
|
|
|
|
margin-inline-end: 1em; |
|
|
|
|
|
inset-inline-end: 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&:hover .footer-nav-icon-before { |
|
|
&:hover .footer-nav-icon-before { |
|
|
right: 0.2em; |
|
|
inset-inline-end: 0.2em; |
|
|
} |
|
|
} |
|
|
`,
|
|
|
`,
|
|
|
nextNav: css` |
|
|
nextNav: css` |
|
@ -64,16 +64,16 @@ const useStyle = createStyles(({ token }) => { |
|
|
|
|
|
|
|
|
.footer-nav-icon-after { |
|
|
.footer-nav-icon-after { |
|
|
position: relative; |
|
|
position: relative; |
|
|
margin-inline-start: 1em; |
|
|
|
|
|
margin-bottom: 1px; |
|
|
margin-bottom: 1px; |
|
|
vertical-align: middle; |
|
|
|
|
|
line-height: 0; |
|
|
line-height: 0; |
|
|
left: 0; |
|
|
vertical-align: middle; |
|
|
transition: left 0.3s; |
|
|
transition: inset-inline-start 0.3s; |
|
|
|
|
|
margin-inline-start: 1em; |
|
|
|
|
|
inset-inline-start: 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&:hover .footer-nav-icon-after { |
|
|
&:hover .footer-nav-icon-after { |
|
|
left: 0.2em; |
|
|
inset-inline-start: 0.2em; |
|
|
} |
|
|
} |
|
|
`,
|
|
|
`,
|
|
|
}; |
|
|
}; |
|
@ -100,8 +100,8 @@ const PrevAndNext: React.FC<{ rtl?: boolean }> = ({ rtl }) => { |
|
|
const beforeProps = { className: 'footer-nav-icon-before' }; |
|
|
const beforeProps = { className: 'footer-nav-icon-before' }; |
|
|
const afterProps = { className: 'footer-nav-icon-after' }; |
|
|
const afterProps = { className: 'footer-nav-icon-after' }; |
|
|
|
|
|
|
|
|
const before = rtl ? <LeftOutlined {...beforeProps} /> : <RightOutlined {...beforeProps} />; |
|
|
const before = rtl ? <RightOutlined {...beforeProps} /> : <LeftOutlined {...beforeProps} />; |
|
|
const after = rtl ? <RightOutlined {...afterProps} /> : <LeftOutlined {...afterProps} />; |
|
|
const after = rtl ? <LeftOutlined {...afterProps} /> : <RightOutlined {...afterProps} />; |
|
|
|
|
|
|
|
|
const [menuItems, selectedKey] = useMenu({ before, after }); |
|
|
const [menuItems, selectedKey] = useMenu({ before, after }); |
|
|
|
|
|
|
|
|