diff --git a/docs/app/Examples/addons/Portal/Types/PortalExamplePortal.js b/docs/app/Examples/addons/Portal/Types/PortalExamplePortal.js new file mode 100644 index 0000000000..5bd6abdb36 --- /dev/null +++ b/docs/app/Examples/addons/Portal/Types/PortalExamplePortal.js @@ -0,0 +1,58 @@ +import React, { Component } from 'react' +import { Button, Grid, Header, Segment, Portal } from 'semantic-ui-react' + +export default class ExamplePortal extends Component { + state = { + log: [], + open: false, + } + + handleOpen = () => { + this.setState({ open: true }) + this.writeLog('Portal mounted') + } + + handleClose = () => { + this.setState({ open: false }) + this.writeLog('Portal closed') + } + + writeLog = message => this.setState({ log: [message, ...this.state.log] }) + + render() { + const { log, open } = this.state + + return ( + + + + )} + onOpen={this.handleOpen} + onClose={this.handleClose} + > + +
This is an example portal
+

Portals have tons of great callback functions to hook into.

+

To close, simply click the close button or click away

+
+
+
+ + +
+                {log.map((e, i) => 

{e}

)} +
+
+
+
+ ) + } +} diff --git a/docs/app/Examples/addons/Portal/Types/index.js b/docs/app/Examples/addons/Portal/Types/index.js new file mode 100644 index 0000000000..9f9809d4e2 --- /dev/null +++ b/docs/app/Examples/addons/Portal/Types/index.js @@ -0,0 +1,16 @@ +import React from 'react' + +import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' +import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' + +const PortalTypesExamples = () => ( + + + +) + +export default PortalTypesExamples diff --git a/docs/app/Examples/addons/Portal/index.js b/docs/app/Examples/addons/Portal/index.js new file mode 100644 index 0000000000..c3921d2e06 --- /dev/null +++ b/docs/app/Examples/addons/Portal/index.js @@ -0,0 +1,10 @@ +import React from 'react' +import Types from './Types' + +const PortalExamples = () => ( +
+ +
+) + +export default PortalExamples diff --git a/package-lock.json b/package-lock.json index 61cd7857e0..426f69ed5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2,7 +2,10 @@ "name": "semantic-ui-react", "version": "0.71.0", "lockfileVersion": 1, +<<<<<<< HEAD +======= "requires": true, +>>>>>>> 2b906ed491a6d15f9df44d365f6fd800add44501 "dependencies": { "@types/react": { "version": "15.0.31", @@ -5653,12 +5656,15 @@ "gulp": { "version": "github:gulpjs/gulp#38246c3f8b6dbb8d4ef657183e92d90c8299e22f", "dev": true, +<<<<<<< HEAD +======= "requires": { "glob-watcher": "3.2.0", "gulp-cli": "1.3.0", "undertaker": "1.1.0", "vinyl-fs": "2.4.4" }, +>>>>>>> 2b906ed491a6d15f9df44d365f6fd800add44501 "dependencies": { "gulp-cli": { "version": "1.3.0",