diff --git a/docs/app/Examples/addons/Portal/Types/PortalExampleControlled.js b/docs/app/Examples/addons/Portal/Types/PortalExampleControlled.js new file mode 100644 index 0000000000..a2352a149a --- /dev/null +++ b/docs/app/Examples/addons/Portal/Types/PortalExampleControlled.js @@ -0,0 +1,42 @@ +import React, { Component } from 'react' +import { Button, Grid, Header, Segment, Portal } from 'semantic-ui-react' + +export default class PortalExampleControlled extends Component { + state = { + open: false, + } + + handleClick = () => this.setState({ open: !this.state.open }) + + handleClose = () => this.setState({ open: false }) + + render() { + const { open } = this.state + + return ( + + + + Event Log + + +
{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 index 9f9809d4e2..7f2ad57bb3 100644 --- a/docs/app/Examples/addons/Portal/Types/index.js +++ b/docs/app/Examples/addons/Portal/Types/index.js @@ -10,6 +10,11 @@ const PortalTypesExamples = () => ( description='A basic portal.' examplePath='addons/Portal/Types/PortalExamplePortal' /> + )