Skip to content

Commit

Permalink
Merge branch 'import-features' into import-alpha-release
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerprete committed Mar 23, 2020
2 parents 98ad42e + 5d5cfd2 commit 9856a9f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
10 changes: 6 additions & 4 deletions modules/editor/src/import-component.js
Expand Up @@ -81,7 +81,8 @@ const FooterRow = styled.div`

export type ImportComponentProps = {
onImport: any => mixed,
onCancel: () => mixed
onCancel: () => mixed,
additionalInputs?: React$Node
};

export function ImportComponent(props: ImportComponentProps) {
Expand Down Expand Up @@ -182,7 +183,7 @@ export function ImportComponent(props: ImportComponentProps) {
<ImportInfo>
Supported formats:
<ul style={{ marginTop: '0' }}>
<li>
<li key="geojson">
<a
href="https://tools.ietf.org/html/rfc7946"
target="_blank"
Expand All @@ -192,7 +193,7 @@ export function ImportComponent(props: ImportComponentProps) {
GeoJSON
</a>
</li>
<li>
<li key="kml">
<a
href="https://developers.google.com/kml/"
target="_blank"
Expand All @@ -202,7 +203,7 @@ export function ImportComponent(props: ImportComponentProps) {
KML
</a>
</li>
<li>
<li key="wkt">
<a
href="https://en.wikipedia.org/wiki/Well-known_text"
target="_blank"
Expand All @@ -215,6 +216,7 @@ export function ImportComponent(props: ImportComponentProps) {
</ul>
</ImportInfo>
</ImportContent>
{props.additionalInputs || null}
<FooterRow>
<Button
style={
Expand Down
11 changes: 9 additions & 2 deletions modules/editor/src/import-modal.js
Expand Up @@ -7,15 +7,22 @@ import { EditorModal } from './editor-modal.js';

export type ImportModalProps = {
onImport: any => mixed,
onClose: () => mixed
onClose: () => mixed,
additionalInputs?: React$Node
};

export function ImportModal(props: ImportModalProps) {
return (
<EditorModal
onClose={props.onClose}
title={'Import'}
content={<ImportComponent onImport={props.onImport} onCancel={props.onClose} />}
content={
<ImportComponent
onImport={props.onImport}
onCancel={props.onClose}
additionalInputs={props.additionalInputs}
/>
}
/>
);
}

0 comments on commit 9856a9f

Please sign in to comment.