Browse Source
* NoticeIcon: using Dropdown instead of Popover. * NoticeIcon: using 100% width on mobile * New component `HeaderDropdown` * Using PureComponent because of refspull/3087/head
committed by
陈帅
13 changed files with 72 additions and 46 deletions
@ -0,0 +1,13 @@ |
|||
import React, { PureComponent } from 'react'; |
|||
import { Dropdown } from 'antd'; |
|||
import classNames from 'classnames'; |
|||
import styles from './index.less'; |
|||
|
|||
export default class HeaderDropdown extends PureComponent { |
|||
render() { |
|||
const { overlayClassName, ...props } = this.props; |
|||
return ( |
|||
<Dropdown overlayClassName={classNames(styles.container, overlayClassName)} {...props} /> |
|||
); |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
@import '~antd/lib/style/themes/default.less'; |
|||
|
|||
.container > *:global(:not(.ant-dropdown-menu)) { |
|||
background-color: #fff; |
|||
box-shadow: @shadow-1-down; |
|||
border-radius: 4px; |
|||
} |
|||
|
|||
@media screen and (max-width: @screen-xs) { |
|||
.container { |
|||
width: 100% !important; |
|||
} |
|||
.container > * { |
|||
border-radius: 0 !important; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue