diff --git a/src/components/modals/ExportModal.jsx b/src/components/modals/ExportModal.jsx index 78a74c7..bb107b4 100644 --- a/src/components/modals/ExportModal.jsx +++ b/src/components/modals/ExportModal.jsx @@ -26,6 +26,7 @@ class Gist extends React.Component { super(props); this.state = { preview: false, + public: false, saving: false, latestGist: null, } @@ -94,7 +95,7 @@ class Gist extends React.Component { const gh = new GitHub(); let gist = gh.getGist(); // not a gist yet gist.create({ - public: true, + public: this.state.public, description: styleTitle, files: files }).then(function({data}) { @@ -115,6 +116,13 @@ class Gist extends React.Component { }) } + onPublicChange(value) { + this.setState({ + ...this.state, + public: value + }) + } + changeMetadataProperty(property, value) { const changedStyle = { ...this.props.mapStyle, @@ -167,13 +175,22 @@ class Gist extends React.Component { Save to Gist (anonymous) - {' '} - - Include preview +
+ + Public gist +
+
+ + Include preview +
{this.state.preview ?