fix: Minor button alignment issues
This commit is contained in:
@ -81,7 +81,7 @@ const Label = styled.span`
|
|||||||
${props => props.hasIcon && 'padding-left: 4px;'};
|
${props => props.hasIcon && 'padding-left: 4px;'};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Inner = styled.span`
|
export const Inner = styled.span`
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
padding-right: ${props => (props.disclosure ? 2 : 8)}px;
|
padding-right: ${props => (props.disclosure ? 2 : 8)}px;
|
||||||
|
@ -3,7 +3,7 @@ import * as React from 'react';
|
|||||||
import { find } from 'lodash';
|
import { find } from 'lodash';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import Scrollable from 'components/Scrollable';
|
import Scrollable from 'components/Scrollable';
|
||||||
import Button from 'components/Button';
|
import Button, { Inner } from 'components/Button';
|
||||||
import { DropdownMenu } from 'components/DropdownMenu';
|
import { DropdownMenu } from 'components/DropdownMenu';
|
||||||
import FilterOption from './FilterOption';
|
import FilterOption from './FilterOption';
|
||||||
|
|
||||||
@ -68,6 +68,10 @@ const StyledButton = styled(Button)`
|
|||||||
&:hover {
|
&:hover {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
${Inner} {
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const SearchFilter = props => {
|
const SearchFilter = props => {
|
||||||
|
@ -3,7 +3,7 @@ import * as React from 'react';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now';
|
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now';
|
||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import { Link } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { EditIcon } from 'outline-icons';
|
import { EditIcon } from 'outline-icons';
|
||||||
import Flex from 'shared/components/Flex';
|
import Flex from 'shared/components/Flex';
|
||||||
import HelpText from 'components/HelpText';
|
import HelpText from 'components/HelpText';
|
||||||
@ -16,11 +16,13 @@ import Subheading from 'components/Subheading';
|
|||||||
import User from 'models/User';
|
import User from 'models/User';
|
||||||
import DocumentsStore from 'stores/DocumentsStore';
|
import DocumentsStore from 'stores/DocumentsStore';
|
||||||
import AuthStore from 'stores/AuthStore';
|
import AuthStore from 'stores/AuthStore';
|
||||||
|
import { settings } from 'shared/utils/routeHelpers';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
user: User,
|
user: User,
|
||||||
auth: AuthStore,
|
auth: AuthStore,
|
||||||
documents: DocumentsStore,
|
documents: DocumentsStore,
|
||||||
|
history: Object,
|
||||||
onRequestClose: () => *,
|
onRequestClose: () => *,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -51,7 +53,11 @@ class UserProfile extends React.Component<Props> {
|
|||||||
{user.isSuspended && <Badge>Suspended</Badge>}
|
{user.isSuspended && <Badge>Suspended</Badge>}
|
||||||
{isCurrentUser && (
|
{isCurrentUser && (
|
||||||
<Edit>
|
<Edit>
|
||||||
<Button to="/settings" as={Link} icon={<EditIcon />} neutral>
|
<Button
|
||||||
|
onClick={() => this.props.history.push(settings())}
|
||||||
|
icon={<EditIcon />}
|
||||||
|
neutral
|
||||||
|
>
|
||||||
Edit Profile
|
Edit Profile
|
||||||
</Button>
|
</Button>
|
||||||
</Edit>
|
</Edit>
|
||||||
@ -88,4 +94,4 @@ const Meta = styled(HelpText)`
|
|||||||
margin-top: -12px;
|
margin-top: -12px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default inject('documents', 'auth')(UserProfile);
|
export default inject('documents', 'auth')(withRouter(UserProfile));
|
||||||
|
Reference in New Issue
Block a user