move styles from root block to its elements

This commit is contained in:
igoradamenko
2018-01-28 23:12:18 +02:00
parent 1808cafea6
commit 99523f8925
5 changed files with 21 additions and 10 deletions
@@ -0,0 +1,3 @@
.root__input {
margin-bottom: 24px;
}
@@ -0,0 +1,7 @@
@import 'common/variables';
.root__thread {
&:last-child {
margin-bottom: -$offset;
}
}
+2 -1
View File
@@ -1,3 +1,4 @@
export { default } from './root';
require('./root.scss');
require('./__input/root__input.scss');
require('./__thread/root__thread.scss');
+9 -4
View File
@@ -3,6 +3,7 @@ import api from 'common/api';
import { url, id } from 'common/settings';
import Input from 'components/input';
import Thread from 'components/thread';
export default class Root extends Component {
@@ -13,10 +14,14 @@ export default class Root extends Component {
render({}, { comments = [] }) {
return (
<div className="root" id={id}>
{
comments.map(thread => <Thread data={thread} mods={{ level: 0 }}/>)
}
<div>
<div className="root" id={id}>
<Input mix="root__input"/>
{
comments.map(thread => <Thread data={thread} mods={{ level: 0 }} mix="root__thread"/>)
}
</div>
</div>
);
}
-5
View File
@@ -1,5 +0,0 @@
@import 'common/variables';
.root {
margin-bottom: -$offset;
}