Skip to content

Commit

Permalink
fix: #1282
Browse files Browse the repository at this point in the history
  • Loading branch information
Wugaoliang committed Nov 6, 2020
1 parent f2a7667 commit 1b5e841
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- 修复 `Tag` 闪烁问题 [#1273](https://github.com/XiaoMi/hiui/issues/1273)
- 修复 `Timeline` 折断样式问题 [#1276](https://github.com/XiaoMi/hiui/issues/1276)
- 修复 `Timeline` 只有一条数据时的样式问题 [#1277](https://github.com/XiaoMi/hiui/issues/1277)
- 修复 `Popover` 包裹函数组件无法触发问题 [#1282](https://github.com/XiaoMi/hiui/issues/1282)

## 3.0.0

Expand Down
9 changes: 3 additions & 6 deletions components/icon/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { forwardRef } from 'react'
import React from 'react'
import classNames from 'classnames'

import './style/index'
Expand Down Expand Up @@ -50,7 +50,7 @@ const legacyMap = {
refer: 'document-search'
}

const InternalIcon = ({ name, filled = false, className, style = {}, onClick, innerRef }) => {
const Icon = ({ name, filled = false, className, style = {}, onClick, innerRef }) => {
return (
<svg
className={classNames(className, 'hi-icon', `icon-${name}`)}
Expand All @@ -72,7 +72,4 @@ const InternalIcon = ({ name, filled = false, className, style = {}, onClick, in
)
}

// const Icon = forwardRef((props, ref) => {
// return <InternalIcon {...props} innerRef={ref} />
// })
export default InternalIcon
export default Icon
6 changes: 1 addition & 5 deletions docs/demo/popover/section-base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import DocViewer from '../../../libs/doc-viewer'
import Popover from '../../../components/popover'
import Button from '../../../components/button'
import Icon from '../../../components/icon'
const prefix = 'Popover-base'
const desc = '用于信息描述、辅助信息等'
const code = `import React from 'react'
Expand All @@ -24,9 +23,6 @@ class Demo extends React.Component {
<Popover title={title} content={content} style={{margin: '10px 10px'}}>
<Button type="line">Top & click触发</Button>
</Popover>
<Popover title={title} content={content} style={{margin: '10px 10px'}} placement="right" trigger="hover">
<Icon name="info-circle" style={{color: '#4284F5', fontSize: '24px'}} />
</Popover>
<Popover title={title} content={content} style={{margin: '10px 10px'}} placement="right" trigger="hover">
<Button type="success">Right & hover触发</Button>
</Popover>
Expand All @@ -41,5 +37,5 @@ class Demo extends React.Component {
}
}`

const DemoBase = () => <DocViewer code={code} scope={{ Popover, Button, Icon }} prefix={prefix} desc={desc} />
const DemoBase = () => <DocViewer code={code} scope={{ Popover, Button }} prefix={prefix} desc={desc} />
export default DemoBase

0 comments on commit 1b5e841

Please sign in to comment.