mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-05-04 21:53:59 -04:00
* obs ID and UUID on ObsDetails selectable * obs ID w/o separators on ObsDetails * taxon names on TaxonDetails selectable
32 lines
732 B
TypeScript
32 lines
732 B
TypeScript
import {
|
|
Body4
|
|
} from "components/SharedComponents";
|
|
import { View } from "components/styledComponents";
|
|
import React from "react";
|
|
|
|
type Props = {
|
|
label: string;
|
|
LabelComponent?: Function;
|
|
valueSelectable?: boolean;
|
|
value: string | number;
|
|
ValueComponent?: Function;
|
|
}
|
|
|
|
const LabelColonValue = ( {
|
|
label,
|
|
LabelComponent = Body4,
|
|
valueSelectable,
|
|
value,
|
|
ValueComponent = Body4
|
|
}: Props ) => (
|
|
<View className="flex-row justify-start">
|
|
<View className="flex-row">
|
|
<LabelComponent>{ label }</LabelComponent>
|
|
<LabelComponent>:</LabelComponent>
|
|
</View>
|
|
<ValueComponent selectable={valueSelectable} className="ml-1">{ value }</ValueComponent>
|
|
</View>
|
|
);
|
|
|
|
export default LabelColonValue;
|