mirror of https://gitlab.com/ceda_ei/sonzai.git
Fix margin at bottom for Subjects, HomeScreen.
This commit is contained in:
parent
0feabb5599
commit
edba7c9458
|
@ -36,7 +36,7 @@ function Subjects({ theme, subjects, addSubject, removeSubject }) {
|
||||||
style={
|
style={
|
||||||
[
|
[
|
||||||
style.card,
|
style.card,
|
||||||
{marginBottom: idx === subjects.length - 1 ? 12 : 0 }
|
{marginBottom: idx === subjects.length - 1 ? 80 : 0 }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
|
@ -10,13 +10,22 @@ import {
|
||||||
|
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
StyleSheet
|
StyleSheet,
|
||||||
|
ScrollView
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
|
|
||||||
function HomeScreen({ theme, timetable, subjects, navigation, days }) {
|
function HomeScreen({ theme, timetable, subjects, navigation, days }) {
|
||||||
return (<>
|
return (<ScrollView>
|
||||||
{timetable.map((day, dayIdx) => (
|
{timetable.map((day, dayIdx) => (
|
||||||
<Card key={dayIdx} style={style.card}>
|
<Card
|
||||||
|
key={dayIdx}
|
||||||
|
style={
|
||||||
|
[
|
||||||
|
style.card,
|
||||||
|
{marginBottom: dayIdx === 6 ? 80 : 0 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
>
|
||||||
<Card.Title title={days[dayIdx]} />
|
<Card.Title title={days[dayIdx]} />
|
||||||
<Card.Content>
|
<Card.Content>
|
||||||
{day.map((cls, idx) => {
|
{day.map((cls, idx) => {
|
||||||
|
@ -37,7 +46,7 @@ function HomeScreen({ theme, timetable, subjects, navigation, days }) {
|
||||||
</Card.Actions>
|
</Card.Actions>
|
||||||
</Card>
|
</Card>
|
||||||
))}
|
))}
|
||||||
</>);
|
</ScrollView>);
|
||||||
}
|
}
|
||||||
|
|
||||||
HomeScreen.propTypes = {
|
HomeScreen.propTypes = {
|
||||||
|
|
Loading…
Reference in New Issue