2021-10-05 15:44:14 +00:00
|
|
|
import { MenuItem } from '@skolplattformen/api-skolplattformen'
|
2021-06-16 12:10:06 +00:00
|
|
|
import { StyleService, Text, useStyleSheet } from '@ui-kitten/components'
|
2021-04-03 07:36:26 +00:00
|
|
|
import React from 'react'
|
2021-05-06 12:35:11 +00:00
|
|
|
import { View } from 'react-native'
|
|
|
|
import { Sizing, Typography } from '../styles'
|
2021-04-03 07:36:26 +00:00
|
|
|
|
|
|
|
interface MenuListItemProps {
|
|
|
|
item: MenuItem
|
|
|
|
}
|
|
|
|
|
|
|
|
export const MenuListItem = ({ item }: MenuListItemProps) => {
|
2021-05-06 12:35:11 +00:00
|
|
|
const styles = useStyleSheet(themedStyles)
|
2021-04-03 07:36:26 +00:00
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
2021-06-16 12:10:06 +00:00
|
|
|
<Text style={styles.title}>{item.title}</Text>
|
|
|
|
<Text category="p1">{item.description}</Text>
|
2021-04-03 07:36:26 +00:00
|
|
|
</View>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-05-06 12:35:11 +00:00
|
|
|
const themedStyles = StyleService.create({
|
2021-04-03 07:36:26 +00:00
|
|
|
container: {
|
|
|
|
width: '100%',
|
2021-06-16 12:10:06 +00:00
|
|
|
paddingVertical: Sizing.t3,
|
2021-04-03 07:36:26 +00:00
|
|
|
},
|
|
|
|
topContainer: {
|
2021-04-23 11:33:29 +00:00
|
|
|
margin: Sizing.t1,
|
2021-04-03 07:36:26 +00:00
|
|
|
flexDirection: 'row',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
},
|
2021-04-23 11:33:29 +00:00
|
|
|
title: {
|
|
|
|
...Typography.header,
|
2021-06-16 12:10:06 +00:00
|
|
|
marginBottom: Sizing.t1,
|
2021-04-03 07:36:26 +00:00
|
|
|
},
|
|
|
|
})
|