-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: (tiles) Start using new responsive helper throughout
- Loading branch information
Showing
9 changed files
with
133 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react'; | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import { useResponsive } from '../../../hooks/useResponsive'; | ||
|
||
const Indicator = () => { | ||
const { isDesktop, isTablet, isMobile } = useResponsive(); | ||
|
||
const getCurrentLayout = () => { | ||
if (isDesktop) return 'Desktop Layout'; | ||
if (isTablet) return 'Tablet Layout'; | ||
return 'Mobile Layout'; | ||
}; | ||
|
||
return ( | ||
<View style={styles.indicator}> | ||
<Text style={styles.indicatorText}>{getCurrentLayout()}</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
indicator: { | ||
position: 'absolute', | ||
bottom: 10, | ||
right: 10, | ||
backgroundColor: 'red', | ||
paddingHorizontal: 12, | ||
paddingVertical: 6, | ||
borderRadius: 4, | ||
}, | ||
indicatorText: { | ||
color: 'white', | ||
fontSize: 12, | ||
fontWeight: 'bold', | ||
}, | ||
}); | ||
|
||
export default Indicator; |
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
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