tooot/src/screens/Tabs/Shared/Account/Information.tsx

70 lines
1.9 KiB
TypeScript
Raw Normal View History

2020-12-13 14:04:25 +01:00
import { StyleConstants } from '@utils/styles/constants'
2021-01-23 02:41:50 +01:00
import { useTheme } from '@utils/styles/ThemeManager'
2022-08-07 01:18:10 +02:00
import React from 'react'
2021-01-23 02:41:50 +01:00
import { StyleSheet, View } from 'react-native'
import { Fade, Placeholder } from 'rn-placeholder'
2020-12-27 16:25:29 +01:00
import AccountInformationAccount from './Information/Account'
import AccountInformationActions from './Information/Actions'
2021-01-07 19:13:09 +01:00
import AccountInformationAvatar from './Information/Avatar'
import AccountInformationCreated from './Information/Created'
2020-12-27 16:25:29 +01:00
import AccountInformationFields from './Information/Fields'
2021-01-07 19:13:09 +01:00
import AccountInformationName from './Information/Name'
2021-05-09 21:59:03 +02:00
import AccountInformationNote from './Information/Note'
import AccountInformationPrivateNote from './Information/PrivateNotes'
2021-01-07 19:13:09 +01:00
import AccountInformationStats from './Information/Stats'
2020-11-22 00:46:23 +01:00
2023-01-02 02:08:12 +01:00
const AccountInformation: React.FC = () => {
const { colors } = useTheme()
2021-01-23 02:41:50 +01:00
return (
<View
style={{
marginTop: -StyleConstants.Avatar.L / 2,
padding: StyleConstants.Spacing.Global.PagePadding
}}
>
<Placeholder
Animation={props => (
<Fade {...props} style={{ backgroundColor: colors.shimmerHighlight }} />
)}
>
<View style={styles.avatarAndActions}>
2023-01-02 02:08:12 +01:00
<AccountInformationAvatar />
<AccountInformationActions />
</View>
2020-11-22 00:46:23 +01:00
2023-01-02 02:08:12 +01:00
<AccountInformationName />
2020-12-14 23:44:57 +01:00
2023-01-02 02:08:12 +01:00
<AccountInformationAccount />
2020-11-22 00:46:23 +01:00
<AccountInformationPrivateNote />
2023-01-02 02:08:12 +01:00
<AccountInformationFields />
2020-11-23 00:07:32 +01:00
2023-01-02 02:08:12 +01:00
<AccountInformationNote />
2021-05-09 21:59:03 +02:00
2023-01-02 02:08:12 +01:00
<AccountInformationCreated />
2021-05-09 21:59:03 +02:00
2023-01-02 02:08:12 +01:00
<AccountInformationStats />
</Placeholder>
</View>
)
}
2020-11-22 00:46:23 +01:00
const styles = StyleSheet.create({
2020-12-21 21:47:15 +01:00
base: {
2021-02-01 02:16:53 +01:00
marginTop: -StyleConstants.Avatar.L / 2,
2021-01-16 00:00:31 +01:00
padding: StyleConstants.Spacing.Global.PagePadding
2020-11-23 00:07:32 +01:00
},
2020-12-21 21:47:15 +01:00
avatarAndActions: {
flexDirection: 'row',
justifyContent: 'space-between'
2021-01-07 19:13:09 +01:00
},
actions: {
alignSelf: 'flex-end',
flexDirection: 'row'
2020-11-22 00:46:23 +01:00
}
})
2021-05-09 21:59:03 +02:00
export default AccountInformation