forked from keep-starknet-strange/joyboy
-
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.
feat: app style structure & revamp (keep-starknet-strange#142)
* Fonts & Colors & Spacings * Theme context & themed stylesheet * Text component * Button component * components * Replace Text with component Text * Replace Typography with Text * Rename component folders * Rename component folders * Remove avatar component Avatar component will be re-added later * Revamp components * Remove avatar import * revamp create post screen * Feed revamp * Profile revamp * Auth flow revamp * Post card revamp * Separate Post & PostCard components * Post detail revamp * Fix keyboard avoiding view * small fixes * Revamp modal
- Loading branch information
Showing
103 changed files
with
1,825 additions
and
1,917 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import {Spacing, ThemedStyleSheet} from '../../styles'; | ||
|
||
export default ThemedStyleSheet( | ||
( | ||
theme, | ||
variant: 'default' | 'primary' | 'secondary', | ||
block: boolean, | ||
disabled: boolean, | ||
small: boolean, | ||
) => ({ | ||
container: { | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
backgroundColor: theme.colors.buttonBackground, | ||
paddingVertical: Spacing.medium, | ||
paddingHorizontal: Spacing.xlarge, | ||
borderRadius: 999, | ||
|
||
...(block && { | ||
width: '100%', | ||
}), | ||
|
||
...(small && { | ||
paddingVertical: Spacing.small, | ||
paddingHorizontal: Spacing.large, | ||
}), | ||
|
||
...(variant === 'primary' && { | ||
backgroundColor: theme.colors.primary, | ||
}), | ||
|
||
...(variant === 'secondary' && { | ||
backgroundColor: theme.colors.secondary, | ||
}), | ||
|
||
...(disabled && { | ||
backgroundColor: theme.colors.buttonDisabledBackground, | ||
}), | ||
}, | ||
|
||
text: { | ||
color: theme.colors.buttonText, | ||
fontSize: 15, | ||
textAlign: 'center', | ||
|
||
...(small && { | ||
fontSize: 14, | ||
}), | ||
|
||
...(variant === 'primary' && { | ||
color: theme.colors.onPrimary, | ||
}), | ||
|
||
...(variant === 'secondary' && { | ||
color: theme.colors.onSecondary, | ||
}), | ||
|
||
...(disabled && { | ||
color: theme.colors.buttonDisabledText, | ||
}), | ||
}, | ||
}), | ||
); |
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,41 @@ | ||
import {StyleSheet, View, ViewProps} from 'react-native'; | ||
|
||
import {useColor, useStyles} from '../../hooks'; | ||
import {ColorProp} from '../../styles'; | ||
import stylesheet from './styles'; | ||
|
||
export type DividerProps = ViewProps & { | ||
/** | ||
* Whether the divider is horizontal or vertical. | ||
* @default 'horizontal' | ||
*/ | ||
direction?: 'horizontal' | 'vertical'; | ||
|
||
/** | ||
* The color of the divider. | ||
* @default 'divider' | ||
*/ | ||
color?: ColorProp; | ||
|
||
/** | ||
* The thickness of the divider. | ||
* @default hairlineWidth | ||
*/ | ||
thickness?: number; | ||
}; | ||
|
||
export const Divider: React.FC<DividerProps> = (props) => { | ||
const { | ||
color: colorProp = 'divider', | ||
direction = 'horizontal', | ||
thickness = StyleSheet.hairlineWidth, | ||
style: styleProp, | ||
...viewProps | ||
} = props; | ||
|
||
const color = useColor(colorProp); | ||
|
||
const styles = useStyles(stylesheet, color, thickness); | ||
|
||
return <View style={[styles.divider, styles[direction], styleProp]} {...viewProps} />; | ||
}; |
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,16 @@ | ||
import {ThemedStyleSheet} from '../../styles'; | ||
|
||
export default ThemedStyleSheet((theme, color: string, thickness: number) => ({ | ||
divider: { | ||
backgroundColor: color, | ||
}, | ||
|
||
horizontal: { | ||
width: '100%', | ||
height: thickness, | ||
}, | ||
vertical: { | ||
width: thickness, | ||
height: '100%', | ||
}, | ||
})); |
Oops, something went wrong.