-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move special channel icons to their own component
- Loading branch information
Showing
8 changed files
with
56 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; | ||
import MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons'; | ||
|
||
import {currentTheme} from '@rvmob/Theme'; | ||
|
||
type SpecialCIChannel = | ||
| 'Home' | ||
| 'Friends' | ||
| 'Saved Notes' | ||
| 'Discover' | ||
| 'Debug'; | ||
|
||
export const SpecialChannelIcon = ({channel}: {channel: SpecialCIChannel}) => { | ||
let color = currentTheme.foregroundSecondary; | ||
switch (channel) { | ||
case 'Home': | ||
return <MaterialIcon name="home" size={24} color={color} />; | ||
case 'Friends': | ||
return <MaterialIcon name="group" size={24} color={color} />; | ||
case 'Saved Notes': | ||
return <MaterialIcon name="sticky-note-2" size={24} color={color} />; | ||
case 'Discover': | ||
return <MaterialCommunityIcon name="compass" size={24} color={color} />; | ||
case 'Debug': | ||
return <MaterialIcon name="bug-report" size={24} color={color} />; | ||
default: | ||
return <></>; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters