mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
parent
cbb8b28430
commit
4a826bb25f
@ -17,6 +17,8 @@
|
||||
}
|
||||
|
||||
html {
|
||||
direction: initial;
|
||||
|
||||
&.rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ import './Navigation.less';
|
||||
|
||||
export interface NavigationProps extends SharedProps {
|
||||
isMobile: boolean;
|
||||
isRTL: boolean;
|
||||
pathname: string;
|
||||
responsive: null | 'narrow' | 'crowded';
|
||||
location: { pathname: string; query: any };
|
||||
|
@ -186,7 +186,7 @@ const Header: React.FC<HeaderProps & WrappedComponentProps<'intl'>> = props => {
|
||||
);
|
||||
}, [location]);
|
||||
|
||||
const getNextDirectionText = useMemo<string>(
|
||||
const nextDirectionText = useMemo<string>(
|
||||
() => (direction !== 'rtl' ? 'RTL' : 'LTR'),
|
||||
[direction],
|
||||
);
|
||||
@ -242,7 +242,7 @@ const Header: React.FC<HeaderProps & WrappedComponentProps<'intl'>> = props => {
|
||||
isMobile={isMobile}
|
||||
showTechUIButton={showTechUIButton}
|
||||
pathname={pathname}
|
||||
directionText={getNextDirectionText}
|
||||
directionText={nextDirectionText}
|
||||
onLangChange={onLangChange}
|
||||
onDirectionChange={onDirectionChange}
|
||||
/>
|
||||
@ -275,7 +275,7 @@ const Header: React.FC<HeaderProps & WrappedComponentProps<'intl'>> = props => {
|
||||
className="header-button header-direction-button"
|
||||
key="direction-button"
|
||||
>
|
||||
{getNextDirectionText}
|
||||
{nextDirectionText}
|
||||
</Button>,
|
||||
<More key="more" {...sharedProps} />,
|
||||
<Github key="github" responsive={responsive} />,
|
||||
|
@ -226,6 +226,7 @@ export default class Layout extends React.Component<LayoutPropsType, LayoutState
|
||||
appLocale.locale === 'zh-CN'
|
||||
? '基于 Ant Design 设计体系的 React UI 组件库,用于研发企业级中后台产品。'
|
||||
: 'An enterprise-class UI design language and React UI library with a set of high-quality React components, one of best React UI library for enterprises';
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
||||
<SiteContext.Provider value={{ isMobile, direction, theme, setTheme, setIframeTheme }}>
|
||||
|
Loading…
Reference in New Issue
Block a user