Skip to content

Commit b59fac4

Browse files
committed
chore: code clean
1 parent b995906 commit b59fac4

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

src/Icon.tsx

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
1-
import { StyleSheet, Text } from 'react-native'
2-
import React from 'react'
1+
import { StyleSheet, Text } from 'react-native';
2+
import React from 'react';
33

44
const icons = {
5-
copy: "📋",
6-
done: "✅",
7-
close: "✕",
8-
chevronDown: "▼",
9-
chevronUp: "▲",
10-
error: "❌"
11-
};
5+
copy: '📋',
6+
done: '✅',
7+
close: '✕',
8+
chevronDown: '▼',
9+
chevronUp: '▲',
10+
error: '❌',
11+
};
1212

13-
14-
interface IconProps {
15-
type:'copy'|'done'|'close'|'chevronDown'|'chevronUp'|'error'
16-
}
17-
18-
const Icon:React.FunctionComponent<IconProps> = ({type}) => {
19-
return (
20-
<Text style={styles.closeButton}>{icons[type]}</Text>
21-
)
13+
interface IconProps {
14+
type: 'copy' | 'done' | 'close' | 'chevronDown' | 'chevronUp' | 'error';
2215
}
2316

24-
export default Icon
17+
const Icon: React.FunctionComponent<IconProps> = ({ type }) => {
18+
return <Text style={styles.closeButton}>{icons[type]}</Text>;
19+
};
2520

21+
export default Icon;
2622

2723
const styles = StyleSheet.create({
28-
closeButton: {
29-
fontSize: 18,
30-
color: '#666',
31-
fontWeight: 'bold',
32-
},
33-
});
24+
closeButton: {
25+
fontSize: 18,
26+
color: '#666',
27+
fontWeight: 'bold',
28+
},
29+
});

0 commit comments

Comments
 (0)