-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: split component and change layout spacing
- Loading branch information
1 parent
d2874f4
commit 5f88ea2
Showing
6 changed files
with
98 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/components/socialFeed/NewsFeed/MapComponent/MapDescriptionInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react"; | ||
|
||
import { TextInputCustom } from "../../../inputs/TextInputCustom"; | ||
import { TextInputOutsideLabel } from "../../../inputs/TextInputOutsideLabel"; | ||
|
||
interface TDescriptionInputProps { | ||
description: any; | ||
setDescription: any; | ||
} | ||
|
||
export const MapDescriptionInput: React.FC<TDescriptionInputProps> = ({ | ||
description, | ||
setDescription, | ||
}) => { | ||
return ( | ||
<> | ||
<TextInputOutsideLabel label="Describe for people that will find this track on map" /> | ||
<TextInputCustom | ||
noBrokenCorners | ||
label="" | ||
hideLabel | ||
name="description" | ||
placeHolder="Description" | ||
multiline | ||
numberOfLines={4} | ||
onChangeText={setDescription} | ||
value={description} | ||
/> | ||
</> | ||
); | ||
}; |
60 changes: 60 additions & 0 deletions
60
packages/components/socialFeed/NewsFeed/MapComponent/MapHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import React from "react"; | ||
import { TouchableOpacity, View, ViewStyle } from "react-native"; | ||
|
||
import chevronLeft from "../../../../../assets/icons/chevron-left.svg"; | ||
import close from "../../../../../assets/icons/close.svg"; | ||
import { neutralA3, secondaryColor } from "../../../../utils/style/colors"; | ||
import { fontMedium16, fontSemibold16 } from "../../../../utils/style/fonts"; | ||
import { BrandText } from "../../../BrandText"; | ||
import { SVG } from "../../../SVG"; | ||
import { SpacerRow } from "../../../spacer"; | ||
|
||
interface TMapHeaderProps { | ||
onClose: () => void; | ||
} | ||
|
||
export const MapHeader: React.FC<TMapHeaderProps> = ({ onClose }) => { | ||
return ( | ||
<View style={[header]}> | ||
<View style={[headerText]}> | ||
<View style={[button32]}> | ||
<SVG | ||
source={chevronLeft} | ||
height={24} | ||
width={24} | ||
color={secondaryColor} | ||
/> | ||
</View> | ||
<BrandText style={[fontSemibold16]}>Add location</BrandText> | ||
<SpacerRow size={2} /> | ||
<BrandText style={[fontMedium16, { color: neutralA3 }]}>2/2</BrandText> | ||
</View> | ||
|
||
<TouchableOpacity style={[button32]} onPress={onClose}> | ||
<SVG source={close} height={24} width={24} color={secondaryColor} /> | ||
</TouchableOpacity> | ||
</View> | ||
); | ||
}; | ||
|
||
// MapHeader styles | ||
const header: ViewStyle = { | ||
flexDirection: "row", | ||
alignItems: "center", | ||
justifyContent: "space-between", | ||
width: "100%", | ||
paddingVertical: 20, | ||
}; | ||
|
||
const headerText: ViewStyle = { | ||
flexDirection: "row", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
}; | ||
|
||
const button32: ViewStyle = { | ||
height: 32, | ||
width: 32, | ||
alignItems: "center", | ||
justifyContent: "center", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters