Commit af6ca198 authored by XieZhiXiong's avatar XieZhiXiong

chore: 重新引入Icons组件

parent 1ee66e56
......@@ -14,6 +14,7 @@ import {
TextStyle,
} from 'react-native';
import { useTheme } from '@react-navigation/native';
import Icons from 'react-native-vector-icons/AntDesign';
import useAppStyle from '../../hooks/useAppStyle';
import { ThemeStyle } from '../../constants/theme';
import styles from './styles';
......@@ -159,12 +160,15 @@ const CellItem: React.FC<CellItemProps> = (props: CellItemProps) => {
<View style={[myStyle['list-item-head'], customHeadStyle]}>
{icon || customIcon ? (
<View style={myStyle['list-item-icon']}>
{/* {!customIcon ? (
<Icons name={icon} size={iconSize} color={appTheme.fonts.black1} />
{!customIcon ? (
<Icons
name={icon!}
size={iconSize}
color={appTheme.fonts.black1}
/>
) : (
customIcon
)} */}
{!customIcon ? null : customIcon}
)}
</View>
) : null}
<View style={myStyle['list-item-titleWrap']}>{renderTitle()}</View>
......
import React from 'react';
import { View, Text, ViewStyle, TouchableOpacity } from 'react-native';
import Icons from 'react-native-vector-icons/AntDesign';
import useAppStyle from '../../hooks/useAppStyle';
import styles from './styles';
......@@ -109,10 +110,11 @@ const GridItem: React.FC<GridItemProps> = (props: GridItemProps) => {
>
{!isHasChildren && (
<View style={myStyle['grid-item-icon']}>
{/* {!customRenderIcon ? (
<Icons name={icon} size={iconSize} />
) : customRenderIcon} */}
{!customRenderIcon ? null : customRenderIcon}
{!customRenderIcon ? (
<Icons name={icon!} size={iconSize} />
) : (
customRenderIcon
)}
</View>
)}
{!isHasChildren && (
......
......@@ -7,6 +7,7 @@
*/
import React, { useEffect, useRef } from 'react';
import { Animated, Easing, ViewStyle } from 'react-native';
import Icons from 'react-native-vector-icons/AntDesign';
import useAppStyle from '../../hooks/useAppStyle';
import styles from './styles';
......@@ -68,7 +69,7 @@ const Spin: React.FC<IProps> = (props: IProps) => {
},
]}
>
{/* <Icons name="loading2" size={size} color={color} /> */}
<Icons name="loading2" size={size} color={color} />
</Animated.View>
);
};
......
/* eslint-disable no-undef */
/* eslint-disable react-hooks/exhaustive-deps */
/*
* @Author: XieZhiXiong
* @Date: 2021-03-02 17:21:04
......@@ -14,6 +14,7 @@ import {
ScrollView,
LayoutChangeEvent,
} from 'react-native';
import Icons from 'react-native-vector-icons/AntDesign';
import themeColors from '../../constants/theme/colors';
import useAppStyle from '../../hooks/useAppStyle';
import styles from './styles';
......@@ -221,23 +222,18 @@ const NoticeBar: React.FC<NoticeBarProps> = (props: NoticeBarProps) => {
>
{hasIcon ? (
<View style={myStyle['boticeBar-icon']}>
{/* <Icons
<Icons
size={16}
name={icon || 'sound'}
color={PRESETS_COLOR_MAP[theme][0]}
/> */}
/>
</View>
) : null}
</View>
<View style={[myStyle['boticeBar-content']]}>{renderContent()}</View>
{hasArrow ? (
<TouchableOpacity style={[myStyle['boticeBar-action']]}>
{/* <Icons
size={16}
// eslint-disable-next-line no-nested-ternary
name="right"
color={PRESETS_COLOR_MAP[theme][0]}
/> */}
<Icons size={16} name="right" color={PRESETS_COLOR_MAP[theme][0]} />
</TouchableOpacity>
) : null}
{closable ? (
......@@ -246,12 +242,7 @@ const NoticeBar: React.FC<NoticeBarProps> = (props: NoticeBarProps) => {
activeOpacity={0.8}
onPress={handleClose}
>
{/* <Icons
size={16}
// eslint-disable-next-line no-nested-ternary
name="close"
color={PRESETS_COLOR_MAP[theme][0]}
/> */}
<Icons size={16} name="close" color={PRESETS_COLOR_MAP[theme][0]} />
</TouchableOpacity>
) : null}
</TouchableOpacity>
......
......@@ -16,6 +16,7 @@ import {
StyleSheet,
TextStyle,
} from 'react-native';
import Icons from 'react-native-vector-icons/AntDesign';
import Overlay from '../Overlay';
import useAppStyle from '../../hooks/useAppStyle';
import styles from './styles';
......@@ -212,18 +213,13 @@ const Popup: React.FC<PopupProps> = (props: PopupProps) => {
activeOpacity={0.8}
onPress={handleCancel}
>
{/* {closeIcon === 'close' ? (
{closeIcon === 'close' ? (
<View style={myStyle['popup-ship-close-icon']}>
<Icons name={closeIcon} size={14} color="rgb(227, 228, 229)" />
</View>
) : (
<Icons name={closeIcon} size={24} color="rgb(227, 228, 229)" />
)} */}
{closeIcon === 'close' ? (
<View style={myStyle['popup-ship-close-icon']}>
{/* <Icons name={closeIcon} size={14} color="rgb(227, 228, 229)" /> */}
</View>
) : null}
<Icons name={closeIcon!} size={24} color="rgb(227, 228, 229)" />
)}
</TouchableOpacity>
)}
{title ? (
......
......@@ -8,6 +8,7 @@
import React, { useContext } from 'react';
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
import { useTheme } from '@react-navigation/native';
import Icons from 'react-native-vector-icons/AntDesign';
import { ThemeStyle } from '../../constants/theme';
import useAppStyle from '../../hooks/useAppStyle';
import RadioGroup, { RadioContext } from './Group';
......@@ -22,7 +23,6 @@ interface RadioProps {
/**
* 选中颜色,默认主题色
*/
// eslint-disable-next-line react/require-default-props
color?: string;
/**
* 大小,默认22
......@@ -99,14 +99,14 @@ const Radio = (props: RadioProps) => {
finalDisabled ? myStyle['radio-icon__disabled'] : null,
])}
>
{/* <Icons
<Icons
name="check"
size={finalSize - 4}
size={finalSize! - 4}
color={!finalDisabled ? '#FFFFFF' : '#c8c9cc'}
style={{
opacity: isCheck ? 1 : 0,
}}
/> */}
/>
</View>
{!!children && contentNode}
</TouchableOpacity>
......
/* eslint-disable react/require-default-props */
/*
* @Author: XieZhiXiong
* @Date: 2021-01-11 11:11:20
......@@ -15,6 +14,7 @@ import {
Text,
} from 'react-native';
import { useTheme } from '@react-navigation/native';
import Icons from 'react-native-vector-icons/AntDesign';
import { ThemeStyle } from '../../constants/theme';
import useAppStyle from '../../hooks/useAppStyle';
import themeLayout from '../../constants/theme/layout';
......@@ -191,7 +191,7 @@ const Search: React.FC<SearchProps> = React.forwardRef(
inputRef.current!.blur();
},
}),
// eslint-disable-next-line react-hooks/exhaustive-deps, array-bracket-spacing
// eslint-disable-next-line react-hooks/exhaustive-deps
[inputRef.current],
);
......@@ -215,18 +215,16 @@ const Search: React.FC<SearchProps> = React.forwardRef(
>
{!!label && <Text style={myStyle['search-label']}>{label}</Text>}
<View style={myStyle['search-control']}>
{/* {!customLeftIcon ? (
{!customLeftIcon ? (
<Icons
type="feather"
name={leftIcon}
name={leftIcon!}
size={18}
color="#C0C4CC"
style={myStyle['search-control-left-icon']}
/>
) : (
customLeftIcon
)} */}
{!customLeftIcon ? null : customLeftIcon}
)}
<View style={myStyle['search-field-wrap']}>
<TextInput
ref={inputRef}
......@@ -260,11 +258,7 @@ const Search: React.FC<SearchProps> = React.forwardRef(
style={myStyle['search-control-right-icon']}
onPress={handleClear}
>
{/* <Icons
name="closecircle"
size={18}
color="#C0C4CC"
/> */}
<Icons name="closecircle" size={18} color="#C0C4CC" />
</TouchableOpacity>
)}
</View>
......
......@@ -7,6 +7,7 @@
*/
import React from 'react';
import { TextStyle, TouchableOpacity, Text } from 'react-native';
import Icons from 'react-native-vector-icons/AntDesign';
import useAppStyle from '../../hooks/useAppStyle';
import styles from './styles';
......@@ -45,12 +46,12 @@ const Shuttle: React.FC<ShuttleProps> = (props: ShuttleProps) => {
<Text style={[myStyle['shuttle-describe'], customDescribeStyle]}>
{describe}
</Text>
{/* <Icons
<Icons
name="right"
size={12}
color="#C0C4CC"
style={customDescribeStyle}
/> */}
/>
</TouchableOpacity>
);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment