diff --git a/components/CustomAgenda.js b/components/CustomAgenda.js index ee2b61c..8c0f1cd 100644 --- a/components/CustomAgenda.js +++ b/components/CustomAgenda.js @@ -2,8 +2,14 @@ import * as React from 'react'; import {withTheme} from 'react-native-paper'; import {Agenda} from "react-native-calendars"; +/** + * Abstraction layer for Agenda component, using custom configuration + * + * @param props Props to pass to the element. Must specify an onRef prop to get an Agenda ref. + * @return {*} + */ function CustomAgenda(props) { - const { colors } = props.theme; + const {colors} = props.theme; return ( { introSlides: Array; updateSlides: Array; aprilFoolsSlides: Array; + /** + * Generates intro slides + */ constructor() { super(); this.introSlides = [ @@ -126,8 +103,9 @@ export default class CustomIntroSlider extends React.Component { /** * Render item to be used for the intro introSlides - * @param item - * @param dimensions + * + * @param item The item to be displayed + * @param dimensions Dimensions of the item */ static getIntroRenderItem({item, dimensions}: Object) { @@ -178,3 +156,29 @@ export default class CustomIntroSlider extends React.Component { } +const styles = StyleSheet.create({ + mainContent: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + paddingBottom: 100 + }, + image: { + width: 300, + height: 300, + marginBottom: -50, + }, + text: { + color: 'rgba(255, 255, 255, 0.8)', + backgroundColor: 'transparent', + textAlign: 'center', + paddingHorizontal: 16, + }, + title: { + fontSize: 22, + color: 'white', + backgroundColor: 'transparent', + textAlign: 'center', + marginBottom: 16, + }, +}); diff --git a/components/CustomModal.js b/components/CustomModal.js index 99b38d6..0a9696b 100644 --- a/components/CustomModal.js +++ b/components/CustomModal.js @@ -4,8 +4,14 @@ import * as React from 'react'; import {withTheme} from 'react-native-paper'; import {Modalize} from "react-native-modalize"; +/** + * Abstraction layer for Modalize component, using custom configuration + * + * @param props Props to pass to the element. Must specify an onRef prop to get an Modalize ref. + * @return {*} + */ function CustomModal(props) { - const { colors } = props.theme; + const {colors} = props.theme; return ( - + {props.refreshing ? {props.text} @@ -38,4 +36,19 @@ function EmptyWebSectionListItem(props) { ); } +const styles = StyleSheet.create({ + iconContainer: { + justifyContent: 'center', + alignItems: 'center', + width: '100%', + height: 100, + marginBottom: 20 + }, + subheading: { + textAlign: 'center', + marginRight: 20, + marginLeft: 20, + } +}); + export default withTheme(EmptyWebSectionListItem); diff --git a/components/EventDashboardItem.js b/components/EventDashboardItem.js index cfcd2ee..117f5c4 100644 --- a/components/EventDashboardItem.js +++ b/components/EventDashboardItem.js @@ -2,7 +2,14 @@ import * as React from 'react'; import {Avatar, Card, withTheme} from 'react-native-paper'; +import {StyleSheet} from "react-native"; +/** + * Component used to display a dashboard item containing a preview event + * + * @param props Props to pass to the component + * @return {*} + */ function EventDashBoardItem(props) { const {colors} = props.theme; const iconColor = props.isAvailable ? @@ -13,13 +20,7 @@ function EventDashBoardItem(props) { colors.textDisabled; return ( } + style={styles.avatar}/>} /> {props.children} @@ -41,4 +42,17 @@ function EventDashBoardItem(props) { ); } +const styles = StyleSheet.create({ + card: { + width: 'auto', + marginLeft: 10, + marginRight: 10, + marginTop: 10, + overflow: 'hidden', + }, + avatar: { + backgroundColor: 'transparent' + } +}); + export default withTheme(EventDashBoardItem); diff --git a/components/FeedItem.js b/components/FeedItem.js index 58294a9..e26f4bd 100644 --- a/components/FeedItem.js +++ b/components/FeedItem.js @@ -6,6 +6,11 @@ import i18n from "i18n-js"; const ICON_AMICALE = require('../assets/amicale.png'); +/** + * Gets the amicale INSAT logo + * + * @return {*} + */ function getAvatar() { return ( {i18n.t('homeScreen.dashboard.seeMore')} + icon={'facebook'}> + {i18n.t('homeScreen.dashboard.seeMore')} + ); diff --git a/components/HeaderButton.js b/components/HeaderButton.js index 663dd44..5e09cee 100644 --- a/components/HeaderButton.js +++ b/components/HeaderButton.js @@ -1,8 +1,14 @@ import * as React from 'react'; import {IconButton, withTheme} from 'react-native-paper'; +/** + * Component used to display a header button + * + * @param props Props to pass to the component + * @return {*} + */ function HeaderButton(props) { - const { colors } = props.theme; + const {colors} = props.theme; return ( ; + style={styles.avatar}/>; return ( @@ -34,10 +42,7 @@ function PreviewEventDashboardItem(props) { subtitle={PlanningEventManager.getFormattedEventTime(props.event['date_begin'], props.event['date_end'])} />} {!isEmpty ? - + " + props.event['description'] + ""} tagsStyles={{ p: {color: colors.text,}, @@ -46,11 +51,7 @@ function PreviewEventDashboardItem(props) { : null} - +