forked from vergnet/application-amicale
Improved section headers
This commit is contained in:
parent
ff7e7cb279
commit
9ebf34fca9
1 changed files with 9 additions and 13 deletions
|
@ -387,12 +387,12 @@ export default class ProxiwashScreen extends React.Component<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
getRenderSectionHeader({section}: Object) {
|
getRenderSectionHeader({section}: Object) {
|
||||||
const subtitle = this.getMachineAvailableNumber(section.title === i18n.t('proxiwashScreen.dryers')) + ' ' + i18n.t('proxiwashScreen.numAvailable');
|
const isDryer = section.title === i18n.t('proxiwashScreen.dryers');
|
||||||
|
const subtitle = this.getMachineAvailableNumber(isDryer) + ' ' + i18n.t('proxiwashScreen.numAvailable');
|
||||||
return (
|
return (
|
||||||
<Card style={{
|
<Card style={{
|
||||||
width: '60%',
|
marginLeft: 5,
|
||||||
marginLeft: 'auto',
|
marginRight: 5,
|
||||||
marginRight: 'auto',
|
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
elevation: 4,
|
elevation: 4,
|
||||||
|
@ -400,15 +400,11 @@ export default class ProxiwashScreen extends React.Component<Props, State> {
|
||||||
<Card.Title
|
<Card.Title
|
||||||
title={section.title}
|
title={section.title}
|
||||||
subtitle={subtitle}
|
subtitle={subtitle}
|
||||||
titleStyle={{
|
left={() => <Avatar.Icon
|
||||||
textAlign: 'center'
|
icon={isDryer ? 'tumble-dryer' : 'washing-machine'}
|
||||||
}}
|
color={ThemeManager.getCurrentThemeVariables().primary}
|
||||||
subtitleStyle={{
|
style={{backgroundColor: 'transparent'}}
|
||||||
textAlign: 'center'
|
/>}
|
||||||
}}
|
|
||||||
style={{
|
|
||||||
paddingLeft: 0,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue