Updated components, style modules
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export { default } from './timeline_compose_block';
|
||||
@@ -0,0 +1,40 @@
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import Avatar from '../avatar';
|
||||
import ComposeFormContainer from '../../features/compose/containers/compose_form_container';
|
||||
import { me } from '../../initial_state';
|
||||
|
||||
import './timeline_compose_block.scss';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
account: state.getIn(['accounts', me]),
|
||||
};
|
||||
};
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
class TimelineComposeBlock extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
account: ImmutablePropTypes.map.isRequired,
|
||||
size: PropTypes.number,
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
size: 32,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { account, size, ...rest } = this.props;
|
||||
|
||||
return (
|
||||
<div className='timeline-compose-block'>
|
||||
<div className='timeline-compose-block__avatar'>
|
||||
<Avatar account={account} size={size} />
|
||||
</div>
|
||||
<ComposeFormContainer {...rest} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
.timeline-compose-block {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
@include gab-container-standards();
|
||||
|
||||
.emoji-picker-wrapper {
|
||||
.emoji-picker-dropdown {
|
||||
top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.compose-form {
|
||||
flex: 1 1;
|
||||
padding: 0 0 0 20px !important;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user