Skip to content
This repository has been archived by the owner on Jan 4, 2018. It is now read-only.

Inline styles #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
42 changes: 40 additions & 2 deletions lib/components/github/Explore.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { findDOMNode, PropTypes } from 'react'
import shallowEqualScalar from 'redux/lib/utils/shallowEqualScalar'
import Radium from 'radium'

const DEFAULT_USER = 'emmenko'

Expand All @@ -10,6 +11,42 @@ function parseFullName (params) {
return username + (repo ? '/' + repo : '')
}

const styles = {
button: {
background: '#fff',
color: '#3498db',
padding: '5px 15px',
marginLeft: 10,
border: '2px solid #3498db',
borderRadius: 5,
transition: '.2s all',
':hover': {
background: '#3498db',
color: 'white',
transition: '.2s all'
}
},
input: {
width: 100,
borderRadius: 5,
border: '2px solid #e5e5e5',
transition: '.2s all',
boxShadow: 'none',
':focus': {
width: 300,
borderColor: '#3498db',
transition: '.2s all'
},
'@media (max-width: 480px)': {
display: 'inline',
':focus': {
width: 200
}
}
}
}

@Radium
export default class Explore extends React.Component {

static propTypes = {
Expand Down Expand Up @@ -55,11 +92,12 @@ export default class Explore extends React.Component {
<input
size="45"
ref="usernameOrRepo"
style={styles.input}
onKeyUp={this.handleKeyUp}
onChange={this.handleOnChange}
value={this.state.usernameOrRepo}
placeholder="username/repo" />
<button type="submit" className="pure-button pure-button-primary"
placeholder="Search..." />
<button type="submit" style={styles.button}
onClick={this.handleGoClick}>
Go!
</button>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
"babel-runtime": "5.6.15",
"classnames": "2.1.2",
"parse-link-header": "0.2.0",
"redux": "0.12.0",
"radium": "^0.13.3",
"react": "0.13.3",
"react-pure-render": "1.0.2",
"react-router": "1.0.0-beta2",
"redux": "0.12.0",
"whatwg-fetch": "0.9.0"
},
"devDependencies": {
Expand All @@ -49,4 +50,4 @@
"webpack": "1.10.0",
"webpack-dev-server": "1.10.1"
}
}
}