Fix navicon

This commit is contained in:
Ken-Håvard Lieng 2020-04-30 14:36:30 +02:00
parent c566d5d61d
commit b002eef285
7 changed files with 139 additions and 135 deletions

File diff suppressed because one or more lines are too long

View File

@ -479,9 +479,7 @@ input::-webkit-inner-spin-button {
.navicon { .navicon {
display: none; display: none;
padding: 0 15px; width: 50px;
line-height: 50px;
font-size: 20px;
cursor: pointer; cursor: pointer;
} }
@ -495,7 +493,7 @@ input::-webkit-inner-spin-button {
display: none; display: none;
} }
.chat-title-bar .icon-button { .chat-title-bar .icon-button:not(.navicon) {
color: #999; color: #999;
} }
@ -808,7 +806,7 @@ input.message-input-nick.invalid {
color: #222; color: #222;
} }
.settings button { .settings-button {
width: 200px; width: 200px;
} }
@ -852,8 +850,8 @@ input.message-input-nick.invalid {
margin-right: 0; margin-right: 0;
} }
.settings-button { .settings-file:last-of-type {
margin-top: 10px; margin-bottom: 10px;
} }
} }
@ -1059,7 +1057,7 @@ input.message-input-nick.invalid {
} }
.navicon { .navicon {
display: inline-block; display: block;
} }
.main-container.off-canvas { .main-container.off-canvas {

View File

@ -1,6 +1,6 @@
import React, { memo } from 'react'; import React, { memo } from 'react';
import { FiUsers, FiSearch, FiX } from 'react-icons/fi'; import { FiUsers, FiSearch, FiX } from 'react-icons/fi';
import Navicon from 'containers/Navicon'; import Navicon from 'components/ui/Navicon';
import Button from 'components/ui/Button'; import Button from 'components/ui/Button';
import Editable from 'components/ui/Editable'; import Editable from 'components/ui/Editable';
import { isValidServerName } from 'state/servers'; import { isValidServerName } from 'state/servers';

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { createSelector } from 'reselect'; import { createSelector } from 'reselect';
import { Form, withFormik } from 'formik'; import { Form, withFormik } from 'formik';
import Navicon from 'containers/Navicon'; import Navicon from 'components/ui/Navicon';
import Button from 'components/ui/Button'; import Button from 'components/ui/Button';
import Checkbox from 'components/ui/formik/Checkbox'; import Checkbox from 'components/ui/formik/Checkbox';
import TextInput from 'components/ui/TextInput'; import TextInput from 'components/ui/TextInput';

View File

@ -1,5 +1,5 @@
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import Navicon from 'containers/Navicon'; import Navicon from 'components/ui/Navicon';
import Button from 'components/ui/Button'; import Button from 'components/ui/Button';
import Checkbox from 'components/ui/Checkbox'; import Checkbox from 'components/ui/Checkbox';
import FileInput from 'components/ui/FileInput'; import FileInput from 'components/ui/FileInput';
@ -29,7 +29,10 @@ const Settings = ({
<Navicon /> <Navicon />
<h1>Settings</h1> <h1>Settings</h1>
{installable && ( {installable && (
<Button className="button-install" onClick={handleInstallClick}> <Button
className="settings-button button-install"
onClick={handleInstallClick}
>
<h2>Install</h2> <h2>Install</h2>
</Button> </Button>
)} )}

View File

@ -1,7 +1,19 @@
import React from 'react'; import React from 'react';
import { FiMenu } from 'react-icons/fi';
import { useDispatch } from 'react-redux';
import Button from 'components/ui/Button';
import { toggleMenu } from 'state/ui';
const Navicon = ({ onClick }) => ( const Navicon = () => {
<i className="icon-menu navicon" onClick={onClick} /> const dispatch = useDispatch();
);
return (
<Button
className="navicon"
icon={FiMenu}
onClick={() => dispatch(toggleMenu())}
/>
);
};
export default Navicon; export default Navicon;

View File

@ -1,9 +0,0 @@
import Navicon from 'components/ui/Navicon';
import { toggleMenu } from 'state/ui';
import connect from 'utils/connect';
const mapDispatch = {
onClick: toggleMenu
};
export default connect(null, mapDispatch)(Navicon);