mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-29 16:54:53 +02:00
[Ivan Diaz] - Styling tweaks
This commit is contained in:
parent
3c36f93a9d
commit
e46dcccd0d
@ -13,13 +13,15 @@ import Button from 'core-components/button';
|
|||||||
var MainHomePageLoginWidget = React.createClass({
|
var MainHomePageLoginWidget = React.createClass({
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Widget className="main-home-page--widget">
|
<Widget className="main-home-page--widget" title="Login">
|
||||||
<h3>Login</h3>
|
<Form className="login-widget--form" onSubmit={this.handleSubmit}>
|
||||||
<Form onSubmit={this.handleSubmit} ref="form">
|
<div className="login-widget--inputs">
|
||||||
<Input placeholder="email" name="email" className="login-widget--input"/>
|
<Input placeholder="email" name="email" className="login-widget--input"/>
|
||||||
<Input placeholder="password" name="password" className="login-widget--input"/>
|
<Input placeholder="password" name="password" type="password" className="login-widget--input"/>
|
||||||
|
</div>
|
||||||
<Button type="primary">LOG IN</Button>
|
<Button type="primary">LOG IN</Button>
|
||||||
</Form>
|
</Form>
|
||||||
|
<Button type="link">{'Forgot your password?'}</Button>
|
||||||
</Widget>
|
</Widget>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
.login-widget {
|
.login-widget {
|
||||||
|
&--inputs {
|
||||||
|
}
|
||||||
|
|
||||||
&--input {
|
&--input {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--form {
|
||||||
|
}
|
||||||
}
|
}
|
@ -7,8 +7,8 @@ var MainLayoutHeader = React.createClass({
|
|||||||
return (
|
return (
|
||||||
<div className="main-layout-header">
|
<div className="main-layout-header">
|
||||||
<div className="main-layout-header--login-links">
|
<div className="main-layout-header--login-links">
|
||||||
<Button type="light" route={{to:'home'}}>Log in</Button>
|
<Button type="clean" route={{to:'home'}}>Log in</Button>
|
||||||
<Button type="light" route={{to:'signup'}}>Sign up</Button>
|
<Button type="clean" route={{to:'signup'}}>Sign up</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -21,7 +21,9 @@ describe('Button', () => {
|
|||||||
|
|
||||||
it('should add passed types to class', () => {
|
it('should add passed types to class', () => {
|
||||||
var types = [
|
var types = [
|
||||||
'primary'
|
'primary',
|
||||||
|
'clean',
|
||||||
|
'link'
|
||||||
];
|
];
|
||||||
|
|
||||||
types.forEach((type) => {
|
types.forEach((type) => {
|
||||||
|
@ -12,7 +12,8 @@ var Button = React.createClass({
|
|||||||
children: React.PropTypes.node,
|
children: React.PropTypes.node,
|
||||||
type: React.PropTypes.oneOf([
|
type: React.PropTypes.oneOf([
|
||||||
'primary',
|
'primary',
|
||||||
'light'
|
'clean',
|
||||||
|
'link'
|
||||||
]),
|
]),
|
||||||
route: React.PropTypes.shape({
|
route: React.PropTypes.shape({
|
||||||
to: React.PropTypes. string.isRequired,
|
to: React.PropTypes. string.isRequired,
|
||||||
|
@ -12,8 +12,19 @@
|
|||||||
width: 239px;
|
width: 239px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-light {
|
&-clean {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-link {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: $dark-grey;
|
||||||
|
text-decoration: underline;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -7,7 +7,14 @@ var Input = React.createClass({
|
|||||||
propTypes: {
|
propTypes: {
|
||||||
value: React.PropTypes.string,
|
value: React.PropTypes.string,
|
||||||
validation: React.PropTypes.func,
|
validation: React.PropTypes.func,
|
||||||
onChange: React.PropTypes.func
|
onChange: React.PropTypes.func,
|
||||||
|
type: React.PropTypes.string
|
||||||
|
},
|
||||||
|
|
||||||
|
getDefaultProps() {
|
||||||
|
return {
|
||||||
|
type: 'text'
|
||||||
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -20,7 +27,6 @@ var Input = React.createClass({
|
|||||||
var props = _.clone(this.props);
|
var props = _.clone(this.props);
|
||||||
|
|
||||||
props.className = this.getClass();
|
props.className = this.getClass();
|
||||||
props.type = 'text';
|
|
||||||
|
|
||||||
return props;
|
return props;
|
||||||
},
|
},
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: $dark-grey;
|
border-color: $medium-grey;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
|
@ -3,17 +3,35 @@ import classNames from 'classnames';
|
|||||||
|
|
||||||
var Widget = React.createClass({
|
var Widget = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
|
title: React.PropTypes.string,
|
||||||
children: React.PropTypes.node.isRequired
|
children: React.PropTypes.node.isRequired
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getDefaultProps() {
|
||||||
|
return {
|
||||||
|
title: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className={this.getClass()}>
|
<div className={this.getClass()}>
|
||||||
|
{this.renderTitle()}
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
renderTitle() {
|
||||||
|
var titleNode = null;
|
||||||
|
|
||||||
|
if (this.props.title) {
|
||||||
|
titleNode = <h2 className="widget--title">{this.props.title}</h2>;
|
||||||
|
}
|
||||||
|
|
||||||
|
return titleNode;
|
||||||
|
},
|
||||||
|
|
||||||
getClass() {
|
getClass() {
|
||||||
var classes = {
|
var classes = {
|
||||||
'widget': true
|
'widget': true
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
|
@import "../scss/vars";
|
||||||
|
|
||||||
.widget {
|
.widget {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 27px;
|
padding: 20px;
|
||||||
width: 324px;
|
width: 324px;
|
||||||
|
|
||||||
|
&--title {
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: $primary-black;
|
||||||
|
font-size: 17px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
@ -6,7 +6,10 @@ $primary-blue: #414A59;
|
|||||||
|
|
||||||
$light-grey: #EEEEEE;
|
$light-grey: #EEEEEE;
|
||||||
$grey: #E7E7E7;
|
$grey: #E7E7E7;
|
||||||
$dark-grey: #D9D9D9;
|
$medium-grey: #D9D9D9;
|
||||||
|
$dark-grey: #8D8D8D;
|
||||||
|
|
||||||
|
$primary-black: #4D4D4D;
|
||||||
|
|
||||||
// SPACING
|
// SPACING
|
||||||
$full-space: 40px;
|
$full-space: 40px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user