patternity
Advanced tools
Comparing version 1.0.39 to 1.0.40
@@ -44,3 +44,3 @@ var React = require('react'); | ||
return { | ||
showTooltip: false, | ||
showTooltip: true, | ||
showClose: false, | ||
@@ -66,3 +66,3 @@ wasClicked: false | ||
position={this.props.position} | ||
container={this.props.containerSelector} | ||
containerSelector={this.props.containerSelector} | ||
onOpen={this.props.onOpen} | ||
@@ -69,0 +69,0 @@ style={this.styles.popover.popover2}> |
var React = require('react'); | ||
var Popover = require('../../../../infl-components/popover'); | ||
var ProfilePopover = require('../../../../infl-components/profile-popover'); | ||
var ProfilePopoverContent = require('../../../../infl-components/profile-popover/profile-popover-content'); | ||
var SaveButton = require('../../../../infl-components/save-button'); | ||
var ProfilePopoverPattern = React.createClass({ | ||
getInitialState: function() { | ||
return { | ||
saveStatus: 'unsaved' | ||
} | ||
}, | ||
render: function() { | ||
var user = { | ||
name: 'Person McPersonson', | ||
title: 'Dastardly Devil', | ||
company: 'Infuitive' | ||
}; | ||
return <div style={{textAlign: 'center'}}> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<ProfilePopover user={user}></ProfilePopover> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<ProfilePopover user={user}></ProfilePopover> | ||
<SaveButton onClick={this.saveStatus} saveStatus={this.state.saveStatus}/> | ||
</div>; | ||
}, | ||
saveStatus() { | ||
if (this.state.saveStatus === 'unsaved') this.setState({saveStatus: 'saving'}); | ||
setTimeout(function() { | ||
this.setState({saveStatus: 'error'}); | ||
}.bind(this), 1000); | ||
} | ||
@@ -39,0 +22,0 @@ }); |
{ | ||
"name": "patternity", | ||
"version": "1.0.39", | ||
"version": "1.0.40", | ||
"description": "Patternity is the pattern library and style guide for all Influitive apps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import React, { Component } from 'react'; | ||
import Popover from '../src/popover'; | ||
import styles from './test.scss'; | ||
import SaveButton from '../src/save-button'; | ||
const style = { | ||
background: 'blue', | ||
borderColor: 'red' | ||
} | ||
class App extends Component { | ||
state = { | ||
isOpen: false | ||
saveStatus: 'unsaved' | ||
} | ||
render() { | ||
return <div style={{textAlign: 'left', background: 'white'}}> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<div style={{position: 'absolute', top: 10, left: 50, width: 25, bottom: 0, background: 'lightblue', | ||
zIndex: 100}}> | ||
</div> | ||
<Popover position="bottom" isOpen={this.state.isOpen} | ||
element={<span onClick={() => this.setState({isOpen: !this.state.isOpen})}>HOWDY JOE</span>} | ||
style={style}> | ||
<div className="injected" style={{padding: '15px'}}> | ||
<span> | ||
Hello Shaneciw! There are a lot of things going on here. | ||
Lots of things yes sir. | ||
</span> | ||
</div> | ||
</Popover> | ||
</div>; | ||
const { saveStatus } = this.state; | ||
return <SaveButton saveStatus={saveStatus} onClick={this.saveHandler}/> | ||
} | ||
saveHandler = () => { | ||
if (this.state.saveStatus === 'unsaved') this.setState({saveStatus: 'saving'}); | ||
setTimeout(() => { this.setState({saveStatus: 'saved'}); }, 1000); | ||
} | ||
} | ||
React.render(<App/>, document.getElementById('root')); |
var webpack = require('webpack'); | ||
console.log(__dirname); | ||
var sassPaths = require('node-neat').includePaths.map(function(sassPath) { | ||
return 'includePaths[]=' + sassPath; | ||
}).join('&'); | ||
module.exports = { | ||
@@ -29,3 +32,3 @@ context: __dirname, | ||
test: /\.scss$/, | ||
loader: 'style!css!sass?outputStyle=expanded' | ||
loader: 'style!css!sass?outputStyle=expanded&' + sassPaths, | ||
}, | ||
@@ -32,0 +35,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2933148
476
28335