Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Portal): remove useless props in PortalExampleControlled #2159

Merged
merged 1 commit into from
Oct 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions docs/app/Examples/addons/Portal/Types/PortalExampleControlled.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React, { Component } from 'react'
import { Button, Grid, Header, Segment, Portal } from 'semantic-ui-react'

export default class PortalExampleControlled extends Component {
state = {
open: false,
}
state = { open: false }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be one-line


handleClick = () => this.setState({ open: !this.state.open })

Expand All @@ -23,12 +21,7 @@ export default class PortalExampleControlled extends Component {
onClick={this.handleClick}
/>

<Portal
closeOnTriggerClick
openOnTriggerClick
onClose={this.handleClose}
open={open}
>
<Portal onClose={this.handleClose} open={open}>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

closeOnTriggerClick and openOnTriggerClick are useless for controlled example

<Segment style={{ left: '40%', position: 'fixed', top: '50%', zIndex: 1000 }}>
<Header>This is a controlled portal</Header>
<p>Portals have tons of great callback functions to hook into.</p>
Expand Down