This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<GlobalNavigation {...{ | |
"globalNavigationWebURL": "/global-navigation-web", | |
"isDocument": true, | |
"documentID": 7884175, | |
"context": "document", | |
"documentType": "board", | |
"logoURL": "logoURL()", | |
"settings": [ | |
"Object", | |
"Object" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
// This is not the 'home' icon in the screenshot – we do not have a 'home' icon | |
// in Helios. Something that would be great to add as the one in the screenshot | |
// looks a little out of place among the other Helios icons. | |
import { Screens } from '@invisionapp/helios/icons' | |
import { Dropdown } from '@invisionapp/helios' | |
function MyDropdown(props) { | |
return ( | |
<Dropdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Root } from './styles' | |
export default ({ withPadding, children, ...props }) => ( | |
<Root {...props} withPadding={withPadding}>{children}</Root> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Dropdown, Tooltip } from 'invision-helios' | |
const MyComponent = props => ( | |
<Dropdown trigger={<Tooltip trigger="Open Dropdown">I am the content of the Tooltip</Tooltip>}> | |
{props.children} | |
</Dropdown> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PureComponent, Fragment } from 'react' | |
import { Search, ListView, Avatar, TabBar, Header, ScreenTitle } from 'component-library' | |
import { Settings } from 'component-library/icons' | |
class App extends PureComponent { | |
state = { | |
searchValue: '', | |
listItems: [] | |
} | |
componentDidMount() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Fragment } from 'react' | |
import { Modal, Button } from 'invision-helios' | |
class MyComponent extends React.Component { | |
state = { | |
open: false | |
} | |
handleClick = () => { | |
this.setState(prev => ({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Parent extends Component { | |
state = { | |
counter: 0 | |
} | |
handleClick = () => this.setState({ counter: this.state.counter + 1 }) | |
render() { | |
return ( | |
<div> | |
<p onClick={this.handleClick}>{this.state.counter}</p> | |
<Child /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Pagination | |
aria-label="Pagination Navigation" | |
currentPage={1} | |
element="span" | |
items={[ | |
{ | |
onClick: () => { setState(1) } | |
}, | |
{ | |
onClick: () => { setState(2) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Row ratio={[1, 2, 1]}> | |
<Col>I will be 25%</Col> | |
<Col>I will be 50%</Col> | |
<Col>I will be 25%</Col> | |
</Row> | |
// New props |