-
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.
Merge pull request #33 from white-label-loyalty/reafctor/responsive-s…
…tyling-refactor Reafctor/responsive styling refactor
- Loading branch information
Showing
21 changed files
with
355 additions
and
166 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,38 @@ | ||
import React from 'react'; | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import { useResponsive } from '../../../hooks/useResponsive'; | ||
|
||
const Indicator = () => { | ||
const { isDesktop, isTablet } = 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', | ||
top: 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
Oops, something went wrong.