-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'meeting-components' into meeting-sprint-#121
- Loading branch information
Showing
18 changed files
with
678 additions
and
137 deletions.
There are no files selected for viewing
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React, {PropTypes} from 'react'; | ||
import look, {StyleSheet} from 'react-look'; | ||
import theme from 'universal/styles/theme'; | ||
import Avatar from '../Avatar/Avatar'; | ||
|
||
let s = {}; | ||
|
||
const AvatarGroup = (props) => { | ||
const { label, avatars } = props; | ||
|
||
return ( | ||
<div className={s.root}> | ||
<div className={s.label}> | ||
{label} | ||
</div> | ||
{ | ||
avatars.map((avatar, index) => | ||
<div className={s.item} key={index}> | ||
<Avatar {...avatar} /> | ||
</div> | ||
) | ||
} | ||
</div> | ||
); | ||
}; | ||
|
||
AvatarGroup.propTypes = { | ||
label: PropTypes.string, | ||
avatars: PropTypes.array | ||
}; | ||
|
||
s = StyleSheet.create({ | ||
root: { | ||
textAlign: 'center' | ||
}, | ||
|
||
label: { | ||
color: theme.palette.dark50l, | ||
display: 'inline-block', | ||
fontFamily: theme.typography.serif, | ||
fontStyle: 'italic', | ||
fontWeight: 700, | ||
height: '2.75rem', | ||
lineHeight: '2.75rem', | ||
margin: '0 .75rem', | ||
verticalAlign: 'middle' | ||
}, | ||
|
||
item: { | ||
display: 'inline-block', | ||
margin: '0 .75rem', | ||
position: 'relative', | ||
verticalAlign: 'middle' | ||
} | ||
}); | ||
|
||
export default look(AvatarGroup); |
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
63 changes: 0 additions & 63 deletions
63
src/universal/modules/meeting/components/AvatarGroup/AvatarGroup.js
This file was deleted.
Oops, something went wrong.
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
23 changes: 23 additions & 0 deletions
23
src/universal/modules/meeting/components/MeetingLayout/MeetingLayout.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, {PropTypes} from 'react'; | ||
import look, {StyleSheet} from 'react-look'; | ||
|
||
let styles = {}; | ||
|
||
const MeetingLayout = (props) => | ||
<div className={styles.root}> | ||
{props.children} | ||
</div>; | ||
|
||
MeetingLayout.propTypes = { | ||
children: PropTypes.any | ||
}; | ||
|
||
styles = StyleSheet.create({ | ||
root: { | ||
backgroundColor: '#fff', | ||
display: 'flex !important', | ||
minHeight: '100vh' | ||
} | ||
}); | ||
|
||
export default look(MeetingLayout); |
24 changes: 24 additions & 0 deletions
24
src/universal/modules/meeting/components/MeetingMain/MeetingMain.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React, {PropTypes} from 'react'; | ||
import look, {StyleSheet} from 'react-look'; | ||
|
||
let styles = {}; | ||
|
||
const MeetingMain = (props) => | ||
<div className={styles.root}> | ||
{props.children} | ||
</div>; | ||
|
||
MeetingMain.propTypes = { | ||
children: PropTypes.any | ||
}; | ||
|
||
styles = StyleSheet.create({ | ||
root: { | ||
backgroundColor: '#fff', | ||
display: 'flex !important', | ||
flex: 1, | ||
flexDirection: 'column' | ||
} | ||
}); | ||
|
||
export default look(MeetingMain); |
55 changes: 55 additions & 0 deletions
55
src/universal/modules/meeting/components/MeetingSection/MeetingSection.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React, {PropTypes} from 'react'; | ||
import look, {StyleSheet} from 'react-look'; | ||
|
||
const combineStyles = StyleSheet.combineStyles; | ||
|
||
let s = {}; | ||
|
||
const MeetingContent = (props) => { | ||
const { | ||
children, | ||
flexToFill, | ||
paddingBottom, | ||
paddingTop | ||
} = props; | ||
const stylePadding = { | ||
paddingBottom, | ||
paddingTop | ||
}; | ||
const flexStyles = combineStyles(s.root, s.flex); | ||
const rootStyles = flexToFill ? flexStyles : s.root; | ||
return ( | ||
<div className={rootStyles} style={stylePadding}> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
MeetingContent.propTypes = { | ||
children: PropTypes.any, | ||
flexToFill: PropTypes.bool, | ||
paddingBottom: PropTypes.string, | ||
paddingTop: PropTypes.string | ||
}; | ||
|
||
MeetingContent.defaultProps = { | ||
paddingBottom: '0px', | ||
paddingTop: '0px' | ||
}; | ||
|
||
s = StyleSheet.create({ | ||
root: { | ||
alignItems: 'center', | ||
backgroundColor: '#fff', | ||
display: 'flex !important', | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
width: '100%' | ||
}, | ||
|
||
flex: { | ||
flex: 1 | ||
} | ||
}); | ||
|
||
export default look(MeetingContent); |
84 changes: 84 additions & 0 deletions
84
src/universal/modules/meeting/components/PlaceholderInput/PlaceholderInput.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import React, {PropTypes} from 'react'; | ||
import look, {StyleSheet} from 'react-look'; | ||
import theme from 'universal/styles/theme'; | ||
|
||
let s = {}; | ||
|
||
const PlaceholderInput = (props) => { | ||
const {author, onChange, placeholder, value} = props; | ||
return ( | ||
<div className={s.root}> | ||
<input | ||
className={s.input} | ||
onChange={onChange} | ||
placeholder={placeholder} | ||
title="Placeholder input" | ||
type="text" | ||
value={value} | ||
/> | ||
<div className={s.author}>{author}</div> | ||
</div> | ||
); | ||
}; | ||
|
||
s = StyleSheet.create({ | ||
root: { | ||
backgroundColor: 'transparent', | ||
color: theme.palette.cool, | ||
fontSize: theme.typography.s3, | ||
padding: '.5rem .75rem .5rem 4rem', | ||
position: 'relative', | ||
width: '100%', | ||
|
||
':hover': { | ||
backgroundColor: theme.palette.light | ||
}, | ||
':focus': { | ||
backgroundColor: theme.palette.light | ||
} | ||
}, | ||
|
||
input: { | ||
backgroundColor: 'transparent', | ||
border: 0, | ||
boxShadow: 'none', | ||
display: 'block', | ||
fontFamily: theme.typography.serif, | ||
fontSize: theme.typography.s3, | ||
fontStyle: 'italic', | ||
fontWeight: 700, | ||
margin: 0, | ||
outline: 'none', | ||
padding: 0, | ||
width: '100%' | ||
}, | ||
|
||
author: { | ||
display: 'none', // TODO: Show on focus/active | ||
fontWeight: 700, | ||
right: '.75rem', | ||
lineHeight: `${34 / 16}rem`, | ||
paddingTop: '1px', | ||
position: 'absolute', | ||
textAlign: 'right', | ||
top: 0 | ||
} | ||
}); | ||
|
||
PlaceholderInput.propTypes = { | ||
author: PropTypes.string, | ||
onChange: PropTypes.func, | ||
placeholder: PropTypes.string, | ||
value: PropTypes.string | ||
}; | ||
|
||
PlaceholderInput.defaultProps = { | ||
author: 'MK', | ||
onChange() { | ||
console.log('PlaceholderInput onChange'); | ||
}, | ||
placeholder: 'kittens (press enter)', | ||
value: '' | ||
}; | ||
|
||
export default look(PlaceholderInput); |
Oops, something went wrong.