EXPO Package Upgrades and added job details fields.
This commit is contained in:
28
components/data-label/data-label.component.jsx
Normal file
28
components/data-label/data-label.component.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Input, Item, Label } from "native-base";
|
||||
import React from "react";
|
||||
import { StyleSheet } from "react-native";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { DateTime } from "luxon";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({});
|
||||
|
||||
export function DataLabelComponent({ label, content, dateTime, ...restProps }) {
|
||||
let theContent = content;
|
||||
|
||||
if (dateTime && content)
|
||||
theContent = DateTime.fromISO(content).toLocaleString(
|
||||
DateTime.DATETIME_SHORT
|
||||
);
|
||||
|
||||
return (
|
||||
<Item stackedLabel {...restProps}>
|
||||
<Label>{label}</Label>
|
||||
<Input disabled placeholder={theContent} />
|
||||
</Item>
|
||||
);
|
||||
}
|
||||
const localStyles = StyleSheet.create({});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(DataLabelComponent);
|
||||
Reference in New Issue
Block a user