Skip to content

Commit

Permalink
fixes linitng erros
Browse files Browse the repository at this point in the history
  • Loading branch information
alexUXUI committed Jul 12, 2017
1 parent 5c5db8d commit ed91ecc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 27 deletions.
40 changes: 18 additions & 22 deletions docs/app/Examples/addons/Portal/Types/PortalExamplePortal.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
import React, { Component } from 'react';
import { Portal, Button, Header, Segment, Container } from 'semantic-ui-react';

import React, { Component } from 'react'
import { Portal, Button, Header, Segment } from 'semantic-ui-react'
class ExamplePortal extends Component {

constructor(props) {
super(props)
this.state = {
isPortalOpen: false
isPortalOpen: false,
}

this.portalOpened = this.portalOpened.bind(this);
this.portalMounted = this.portalMounted.bind(this);
this.portalClosed = this.portalClosed.bind(this);
this.portalOpened = this.portalOpened.bind(this)
this.portalMounted = this.portalMounted.bind(this)
this.portalClosed = this.portalClosed.bind(this)
}

portalMounted() {
return alert('Portal mounted');
return alert('Portal mounted')
}

portalOpened() {
this.setState({
isPortalOpen: true
});
return alert('Portal opened. Please scroll down to view.');
isPortalOpen: true,
})
return alert('Portal opened. Please scroll down to view.')
}

portalClosed() {
this.setState({
isPortalOpen: false
});
return alert('Portal closed');
isPortalOpen: false,
})
return alert('Portal closed')
}

render() {
Expand All @@ -38,21 +36,19 @@ class ExamplePortal extends Component {
openOnTriggerClick
closeOnTriggerClick
trigger={
this.state.isPortalOpen ?
<Button negative>Close Portal</Button> :
<Button positive>Open Portal</Button>
}
this.state.isPortalOpen ? <Button negative>Close Portal</Button> : <Button positive>Open Portal</Button> }
onMount={ this.portalMounted }
onOpen={ this.portalOpened }
onClose={ this.portalClosed }>
onClose={ this.portalClosed }
>
<Segment>
<Header>This is an example portal</Header>
<p>Portals have tons of great callback functions to hook into.</p>
<p>To close, simply click the close button or click away</p>
</Segment>
</Portal>
);
)
}
}

export default ExamplePortal;
export default ExamplePortal
8 changes: 3 additions & 5 deletions docs/app/Examples/addons/Portal/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from 'react';
import React from 'react'

import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample';
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection';

import ExamplePortal from './Types/PortalExamplePortal';
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'

const PortalExampleTypesExamples = () => (
<ExampleSection title='Types'>
Expand Down

0 comments on commit ed91ecc

Please sign in to comment.