未验证 提交 15b4429f 编写于 作者: E eiinu 提交者: GitHub

chore(fixednav): icon 组件替换 (#776)

上级 5c6d29d3
import React, { useState, MouseEvent } from 'react'
import { FixedNav, Drag, Icon } from '@/packages/nutui.react.taro'
import Header from '@/sites/components/header'
import Taro from '@tarojs/taro'
import { Retweet } from '@nutui/icons-react-taro'
import { FixedNav, Drag } from '@/packages/nutui.react.taro'
import Header from '@/sites/components/header'
import { useTranslate } from '@/sites/assets/locale/taro'
type TFixedNavDemo = {
......@@ -168,9 +169,7 @@ const FixedNavDemo = () => {
}
slotBtn={
<>
<Icon name="retweet" color="#fff">
{' '}
</Icon>
<Retweet color="#fff" />
<span className="text">
{visible4 ? translated.title4 : translated.title5}
</span>
......
import React, { useState, MouseEvent } from 'react'
import { Retweet } from '@nutui/icons-react'
import { useTranslate } from '../../sites/assets/locale'
import { Icon } from '../icon/icon'
import { FixedNav } from './fixednav'
import Drag from '../drag'
......@@ -168,9 +168,7 @@ const FixedNavDemo = () => {
}
slotBtn={
<>
<Icon name="retweet" color="#fff">
{' '}
</Icon>
<Retweet color="#fff" />
<span className="text">
{visible4 ? translated.title4 : translated.title5}
</span>
......
......@@ -309,8 +309,8 @@ export default App;
| type | navigation direction, optional left right | string | `right` |
| overlay | Whether to show the mask when expanding | boolean | `true` |
| position | fixed vertical position | object | `{top: 'auto', bottom: 'auto'}` |
| slotList | Customize expanded list content | HTMLElement | - |
| slotBtn | custom button | HTMLElement | - |
| slotList | Customize expanded list content | ReactNode | - |
| slotBtn | custom button | ReactNode | - |
### Event
......
......@@ -313,8 +313,8 @@ export default App;
| type | 导航方向,可选值 left right | string | `right` |
| overlay | 展开时是否显示遮罩 | boolean | `true` |
| position | fixed 垂直位置 | object | `{top: 'auto', bottom: 'auto'}` |
| slotList | 自定义展开列表内容 | HTMLElement | - |
| slotBtn | 自定义按钮 | HTMLElement | - |
| slotList | 自定义展开列表内容 | ReactNode | - |
| slotBtn | 自定义按钮 | ReactNode | - |
### Event
......
......@@ -312,8 +312,8 @@ export default App;
| type | 导航方向,可选值 left right | string | `right` |
| overlay | 展开时是否显示遮罩 | boolean | `true` |
| position | fixed 垂直位置 | object | `{top: 'auto', bottom: 'auto'}` |
| slotList | 自定义展开列表内容 | HTMLElement | - |
| slotBtn | 自定义按钮 | HTMLElement | - |
| slotList | 自定义展开列表内容 | ReactNode | - |
| slotBtn | 自定义按钮 | ReactNode | - |
### Event
......
......@@ -313,8 +313,8 @@ export default App;
| type | 導航方向,可選值 left right | string | `right` |
| overlay | 展開時是否顯示遮罩 | boolean | `true` |
| position | fixed 垂直位置 | object | `{top: 'auto', bottom: 'auto'}` |
| slotList | 自定義展開列表內容 | HTMLElement | - |
| slotBtn | 自定義按鈕 | HTMLElement | - |
| slotList | 自定義展開列表內容 | ReactNode | - |
| slotBtn | 自定義按鈕 | ReactNode | - |
### Event
......
import React, { FunctionComponent, MouseEvent } from 'react'
import classNames from 'classnames'
import Icon from '@/packages/icon/index.taro'
import { Left } from '@nutui/icons-react-taro'
import Overlay from '@/packages/overlay/index.taro'
import bem from '@/utils/bem'
import { useConfig } from '@/packages/configprovider/configprovider.taro'
......@@ -56,8 +56,6 @@ export const FixedNav: FunctionComponent<
type,
slotList,
slotBtn,
iconClassPrefix,
iconFontClassName,
...rest
} = {
...defaultProps,
......@@ -115,12 +113,7 @@ export const FixedNav: FunctionComponent<
<div className="nut-fixednav__btn" onClick={() => onUpdateValue()}>
{slotBtn || (
<>
<Icon
classPrefix={iconClassPrefix}
fontClassName={iconFontClassName}
name="left"
color="#fff"
/>
<Left color="#fff" />
<div className="text">
{visible
? activeText || locale.fixednav.activeText
......
import React, { FunctionComponent, MouseEvent } from 'react'
import classNames from 'classnames'
import Icon from '@/packages/icon'
import { Left } from '@nutui/icons-react'
import Overlay from '@/packages/overlay'
import bem from '@/utils/bem'
import { useConfig } from '@/packages/configprovider'
......@@ -56,8 +56,6 @@ export const FixedNav: FunctionComponent<
type,
slotList,
slotBtn,
iconClassPrefix,
iconFontClassName,
...rest
} = {
...defaultProps,
......@@ -125,12 +123,7 @@ export const FixedNav: FunctionComponent<
<div className="nut-fixednav__btn" onClick={() => onUpdateValue()}>
{slotBtn || (
<>
<Icon
classPrefix={iconClassPrefix}
fontClassName={iconFontClassName}
name="left"
color="#fff"
/>
<Left color="#fff" />
<div className="text">
{visible
? activeText || locale.fixednav.activeText
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册