fix: bring back the add meeting URL button
Brings back the button for generating meeting URLs for calendar events.
This commit is contained in:
parent
a148cd41a4
commit
e4c5968459
|
@ -8,6 +8,7 @@ import { ColorPalette } from '../../../styles';
|
|||
import type { Item } from '../../Types';
|
||||
|
||||
import AvatarListItem from './AvatarListItem';
|
||||
import Container from './Container';
|
||||
import Text from './Text';
|
||||
import styles from './styles';
|
||||
|
||||
|
@ -92,6 +93,24 @@ export default class NavigateSectionListItem extends Component<Props> {
|
|||
return lines && lines.length ? lines.map(this._renderItemLine) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the secondary action label.
|
||||
*
|
||||
* @private
|
||||
* @returns {React$Node}
|
||||
*/
|
||||
_renderSecondaryAction() {
|
||||
const { secondaryAction } = this.props;
|
||||
|
||||
return (
|
||||
<Container
|
||||
onClick = { secondaryAction }
|
||||
style = { styles.secondaryActionContainer }>
|
||||
<Text style = { styles.secondaryActionLabel }>+</Text>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the content of this component.
|
||||
*
|
||||
|
@ -124,7 +143,10 @@ export default class NavigateSectionListItem extends Component<Props> {
|
|||
right = { right }>
|
||||
<AvatarListItem
|
||||
item = { item }
|
||||
onPress = { this.props.onPress } />
|
||||
onPress = { this.props.onPress } >
|
||||
{ this.props.secondaryAction
|
||||
&& this._renderSecondaryAction() }
|
||||
</AvatarListItem>
|
||||
</Swipeout>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import { BoxModel, ColorPalette, createStyleSheet } from '../../../styles';
|
||||
|
||||
const OVERLAY_FONT_COLOR = 'rgba(255, 255, 255, 0.6)';
|
||||
const SECONDARY_ACTION_BUTTON_SIZE = 30;
|
||||
|
||||
export const AVATAR_SIZE = 65;
|
||||
export const UNDERLAY_COLOR = 'rgba(255, 255, 255, 0.2)';
|
||||
|
@ -182,6 +183,21 @@ const SECTION_LIST_STYLES = {
|
|||
color: OVERLAY_FONT_COLOR
|
||||
},
|
||||
|
||||
secondaryActionContainer: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: ColorPalette.blue,
|
||||
borderRadius: 3,
|
||||
height: SECONDARY_ACTION_BUTTON_SIZE,
|
||||
justifyContent: 'center',
|
||||
margin: BoxModel.margin * 0.5,
|
||||
marginRight: BoxModel.margin,
|
||||
width: SECONDARY_ACTION_BUTTON_SIZE
|
||||
},
|
||||
|
||||
secondaryActionLabel: {
|
||||
color: ColorPalette.white
|
||||
},
|
||||
|
||||
touchableView: {
|
||||
flexDirection: 'row'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue