chore: Move to prettier standard double quotes (#1309)

This commit is contained in:
Tom Moor
2020-06-20 13:59:15 -07:00
committed by GitHub
parent 2a3b9e2104
commit f43deb7940
444 changed files with 5988 additions and 5977 deletions

View File

@@ -1,12 +1,12 @@
// @flow
import * as React from 'react';
import { observer, inject } from 'mobx-react';
import FilterOptions from './FilterOptions';
import CollectionsStore from 'stores/CollectionsStore';
import * as React from "react";
import { observer, inject } from "mobx-react";
import FilterOptions from "./FilterOptions";
import CollectionsStore from "stores/CollectionsStore";
const defaultOption = {
key: undefined,
label: 'Any collection',
label: "Any collection",
};
type Props = {
@@ -36,4 +36,4 @@ class CollectionFilter extends React.Component<Props> {
}
}
export default inject('collections')(CollectionFilter);
export default inject("collections")(CollectionFilter);

View File

@@ -1,13 +1,13 @@
// @flow
import * as React from 'react';
import FilterOptions from './FilterOptions';
import * as React from "react";
import FilterOptions from "./FilterOptions";
const options = [
{ key: undefined, label: 'Any time' },
{ key: 'day', label: 'Past day' },
{ key: 'week', label: 'Past week' },
{ key: 'month', label: 'Past month' },
{ key: 'year', label: 'Past year' },
{ key: undefined, label: "Any time" },
{ key: "day", label: "Past day" },
{ key: "week", label: "Past week" },
{ key: "month", label: "Past month" },
{ key: "year", label: "Past year" },
];
type Props = {

View File

@@ -1,9 +1,9 @@
// @flow
import * as React from 'react';
import { CheckmarkIcon } from 'outline-icons';
import styled from 'styled-components';
import HelpText from 'components/HelpText';
import Flex from 'shared/components/Flex';
import * as React from "react";
import { CheckmarkIcon } from "outline-icons";
import styled from "styled-components";
import HelpText from "components/HelpText";
import Flex from "shared/components/Flex";
type Props = {
label: string,
@@ -34,7 +34,7 @@ const Checkmark = styled(CheckmarkIcon)`
fill: ${props => props.theme.text};
`;
const Anchor = styled('a')`
const Anchor = styled("a")`
display: flex;
flex-direction: column;
font-size: 15px;
@@ -52,9 +52,9 @@ const Anchor = styled('a')`
}
`;
const ListItem = styled('li')`
const ListItem = styled("li")`
list-style: none;
font-weight: ${props => (props.active ? '600' : 'normal')};
font-weight: ${props => (props.active ? "600" : "normal")};
`;
export default FilterOption;

View File

@@ -1,10 +1,10 @@
// @flow
import * as React from 'react';
import { find } from 'lodash';
import styled from 'styled-components';
import Button, { Inner } from 'components/Button';
import { DropdownMenu } from 'components/DropdownMenu';
import FilterOption from './FilterOption';
import * as React from "react";
import { find } from "lodash";
import styled from "styled-components";
import Button, { Inner } from "components/Button";
import { DropdownMenu } from "components/DropdownMenu";
import FilterOption from "./FilterOption";
type Props = {
options: {
@@ -22,11 +22,11 @@ const FilterOptions = ({
options,
activeKey,
defaultLabel,
selectedPrefix = '',
selectedPrefix = "",
onSelect,
}: Props) => {
const selected = find(options, { key: activeKey }) || options[0];
const selectedLabel = selected ? `${selectedPrefix} ${selected.label}` : '';
const selectedLabel = selected ? `${selectedPrefix} ${selected.label}` : "";
return (
<DropdownButton label={activeKey ? selectedLabel : defaultLabel}>
@@ -49,7 +49,7 @@ const FilterOptions = ({
);
};
const Content = styled('div')`
const Content = styled("div")`
padding: 0 8px;
width: 250px;
@@ -95,7 +95,7 @@ const DropdownButton = styled(SearchFilter)`
margin-right: 8px;
`;
const List = styled('ol')`
const List = styled("ol")`
list-style: none;
margin: 0;
padding: 0;

View File

@@ -1,8 +1,8 @@
// @flow
import * as React from 'react';
import styled, { withTheme } from 'styled-components';
import { SearchIcon } from 'outline-icons';
import Flex from 'shared/components/Flex';
import * as React from "react";
import styled, { withTheme } from "styled-components";
import { SearchIcon } from "outline-icons";
import Flex from "shared/components/Flex";
type Props = {
onChange: string => void,
@@ -16,13 +16,13 @@ class SearchField extends React.Component<Props> {
componentDidMount() {
if (this.props && this.input) {
// ensure that focus is placed at end of input
const len = (this.props.defaultValue || '').length;
const len = (this.props.defaultValue || "").length;
this.input.setSelectionRange(len, len);
}
}
handleChange = (ev: SyntheticEvent<HTMLInputElement>) => {
this.props.onChange(ev.currentTarget.value ? ev.currentTarget.value : '');
this.props.onChange(ev.currentTarget.value ? ev.currentTarget.value : "");
};
focusInput = (ev: SyntheticEvent<>) => {

View File

@@ -1,17 +1,17 @@
// @flow
import * as React from 'react';
import FilterOptions from './FilterOptions';
import * as React from "react";
import FilterOptions from "./FilterOptions";
const options = [
{
key: undefined,
label: 'Active documents',
note: 'Documents in collections you are able to access',
label: "Active documents",
note: "Documents in collections you are able to access",
},
{
key: 'true',
label: 'All documents',
note: 'Include documents that are in the archive',
key: "true",
label: "All documents",
note: "Include documents that are in the archive",
},
];
@@ -24,7 +24,7 @@ const StatusFilter = ({ includeArchived, onSelect }: Props) => {
return (
<FilterOptions
options={options}
activeKey={includeArchived ? 'true' : undefined}
activeKey={includeArchived ? "true" : undefined}
onSelect={onSelect}
defaultLabel="Active documents"
/>

View File

@@ -1,12 +1,12 @@
// @flow
import * as React from 'react';
import { observer, inject } from 'mobx-react';
import FilterOptions from './FilterOptions';
import UsersStore from 'stores/UsersStore';
import * as React from "react";
import { observer, inject } from "mobx-react";
import FilterOptions from "./FilterOptions";
import UsersStore from "stores/UsersStore";
const defaultOption = {
key: undefined,
label: 'Any author',
label: "Any author",
};
type Props = {
@@ -40,4 +40,4 @@ class UserFilter extends React.Component<Props> {
}
}
export default inject('users')(UserFilter);
export default inject("users")(UserFilter);