fix responsive styles

This commit is contained in:
Ginger Wong
2020-08-24 03:30:42 -07:00
parent 0b1f9db4ed
commit 2a02b75e42
9 changed files with 192 additions and 85 deletions

View File

@@ -232,7 +232,7 @@ export default class ChatInput extends Component {
const placeholderText = generatePlaceholderText(inputEnabled, hasSentFirstChatMessage);
return (
html`
<div id="message-input-container" class="w-full shadow-md bg-gray-900 border-t border-gray-700 border-solid p-4">
<div id="message-input-container" class="fixed bottom-0 shadow-md bg-gray-900 border-t border-gray-700 border-solid p-4">
<${ContentEditable}
id="message-input"

View File

@@ -21,14 +21,11 @@ export default class Chat extends Component {
this.scrollableMessagesContainer = createRef();
this.websocket = null;
this.getChatHistory = this.getChatHistory.bind(this);
this.receivedWebsocketMessage = this.receivedWebsocketMessage.bind(this);
this.websocketDisconnected = this.websocketDisconnected.bind(this);
// this.handleSubmitChatButton = this.handleSubmitChatButton.bind(this);
this.submitChat = this.submitChat.bind(this);
}
@@ -39,7 +36,6 @@ export default class Chat extends Component {
if (hasTouchScreen()) {
setVHvar();
window.addEventListener("orientationchange", setVHvar);
// this.tagAppContainer.classList.add('touch-screen');
}
}

View File

@@ -22,8 +22,9 @@ export default class UsernameForm extends Component {
}
handleDisplayForm() {
const { displayForm: curDisplay } = this.state;
this.setState({
displayForm: true,
displayForm: !curDisplay,
});
}
@@ -65,7 +66,7 @@ export default class UsernameForm extends Component {
const formDisplayStyle = narrowSpace ? 'inline-block' : 'flex';
const styles = {
info: {
display: displayForm || narrowSpace ? 'none' : 'flex',
display: displayForm ? 'none' : 'flex',
},
form: {
display: displayForm ? formDisplayStyle : 'none',