chore: Move animations and globals from shared directory (#2344)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import { bounceIn } from "shared/styles/animations";
|
||||
import { bounceIn } from "styles/animations";
|
||||
|
||||
type Props = {|
|
||||
count: number,
|
||||
|
@ -4,13 +4,13 @@ import { Portal } from "react-portal";
|
||||
import { Menu } from "reakit/Menu";
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import usePrevious from "hooks/usePrevious";
|
||||
import {
|
||||
fadeIn,
|
||||
fadeAndSlideUp,
|
||||
fadeAndSlideDown,
|
||||
mobileContextMenu,
|
||||
} from "shared/styles/animations";
|
||||
import usePrevious from "hooks/usePrevious";
|
||||
} from "styles/animations";
|
||||
|
||||
type Props = {|
|
||||
"aria-label": string,
|
||||
|
@ -4,7 +4,7 @@ import * as React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { withRouter, type RouterHistory } from "react-router-dom";
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import { light } from "shared/styles/theme";
|
||||
import { light } from "shared/theme";
|
||||
import UiStore from "stores/UiStore";
|
||||
import ErrorBoundary from "components/ErrorBoundary";
|
||||
import Tooltip from "components/Tooltip";
|
||||
|
@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
import styled from "styled-components";
|
||||
import { fadeIn } from "shared/styles/animations";
|
||||
import { fadeIn } from "styles/animations";
|
||||
|
||||
const Fade = styled.span`
|
||||
animation: ${fadeIn} ${(props) => props.timing || "250ms"} ease-in-out;
|
||||
|
@ -4,10 +4,10 @@ import { transparentize } from "polished";
|
||||
import * as React from "react";
|
||||
import { Portal } from "react-portal";
|
||||
import styled from "styled-components";
|
||||
import { fadeAndSlideDown } from "shared/styles/animations";
|
||||
import parseDocumentSlug from "shared/utils/parseDocumentSlug";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
import HoverPreviewDocument from "components/HoverPreviewDocument";
|
||||
import { fadeAndSlideDown } from "styles/animations";
|
||||
import { isInternalUrl } from "utils/urls";
|
||||
|
||||
const DELAY_OPEN = 300;
|
||||
|
@ -7,12 +7,12 @@ import { useTranslation } from "react-i18next";
|
||||
import { Dialog, DialogBackdrop, useDialogState } from "reakit/Dialog";
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import { fadeAndScaleIn } from "shared/styles/animations";
|
||||
import Flex from "components/Flex";
|
||||
import NudeButton from "components/NudeButton";
|
||||
import Scrollable from "components/Scrollable";
|
||||
import usePrevious from "hooks/usePrevious";
|
||||
import useUnmount from "hooks/useUnmount";
|
||||
import { fadeAndScaleIn } from "styles/animations";
|
||||
|
||||
let openModals = 0;
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import { randomInteger } from "shared/random";
|
||||
import { pulsate } from "shared/styles/animations";
|
||||
import Flex from "components/Flex";
|
||||
import { pulsate } from "styles/animations";
|
||||
|
||||
type Props = {|
|
||||
header?: boolean,
|
||||
|
@ -2,7 +2,7 @@
|
||||
import * as React from "react";
|
||||
import { Popover as ReakitPopover } from "reakit/Popover";
|
||||
import styled from "styled-components";
|
||||
import { fadeAndScaleIn } from "shared/styles/animations";
|
||||
import { fadeAndScaleIn } from "styles/animations";
|
||||
|
||||
type Props = {
|
||||
children: React.Node,
|
||||
|
@ -6,13 +6,13 @@ import { Portal } from "react-portal";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import styled, { useTheme } from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import { fadeIn } from "shared/styles/animations";
|
||||
import Fade from "components/Fade";
|
||||
import Flex from "components/Flex";
|
||||
import ResizeBorder from "./components/ResizeBorder";
|
||||
import Toggle, { ToggleButton, Positioner } from "./components/Toggle";
|
||||
import usePrevious from "hooks/usePrevious";
|
||||
import useStores from "hooks/useStores";
|
||||
import { fadeIn } from "styles/animations";
|
||||
|
||||
let ANIMATION_MS = 250;
|
||||
let isFirstRender = true;
|
||||
|
@ -2,10 +2,10 @@
|
||||
import { observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { ThemeProvider } from "styled-components";
|
||||
import GlobalStyles from "shared/styles/globals";
|
||||
import { dark, light, lightMobile, darkMobile } from "shared/styles/theme";
|
||||
import { dark, light, lightMobile, darkMobile } from "shared/theme";
|
||||
import useMediaQuery from "hooks/useMediaQuery";
|
||||
import useStores from "hooks/useStores";
|
||||
import GlobalStyles from "styles/globals";
|
||||
|
||||
const empty = {};
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { CheckboxIcon, InfoIcon, WarningIcon } from "outline-icons";
|
||||
import { darken } from "polished";
|
||||
import * as React from "react";
|
||||
import styled, { css } from "styled-components";
|
||||
import { fadeAndScaleIn, pulse } from "shared/styles/animations";
|
||||
import { fadeAndScaleIn, pulse } from "styles/animations";
|
||||
import type { Toast as TToast } from "types";
|
||||
|
||||
type Props = {
|
||||
|
@ -7,7 +7,7 @@ import { type TFunction, withTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import { MAX_TITLE_LENGTH } from "shared/constants";
|
||||
import { light } from "shared/styles/theme";
|
||||
import { light } from "shared/theme";
|
||||
import parseTitle from "shared/utils/parseTitle";
|
||||
import Document from "models/Document";
|
||||
import ClickablePadding from "components/ClickablePadding";
|
||||
|
@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
import { action, autorun, computed, observable } from "mobx";
|
||||
import { light as defaultTheme } from "shared/styles/theme";
|
||||
import { light as defaultTheme } from "shared/theme";
|
||||
import Collection from "models/Collection";
|
||||
import Document from "models/Document";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
import { type Location } from "react-router-dom";
|
||||
import theme from "shared/styles/theme";
|
||||
import theme from "shared/theme";
|
||||
import Document from "models/Document";
|
||||
|
||||
export type Theme = typeof theme;
|
||||
|
@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import { Table, TBody, TR, TD } from "oy-vey";
|
||||
import * as React from "react";
|
||||
import theme from "../../../shared/styles/theme";
|
||||
import theme from "../../../shared/theme";
|
||||
|
||||
type Props = {
|
||||
children: React.Node,
|
||||
|
@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import { Table, TBody, TR, TD } from "oy-vey";
|
||||
import * as React from "react";
|
||||
import theme from "../../../shared/styles/theme";
|
||||
import theme from "../../../shared/theme";
|
||||
import { twitterUrl } from "../../../shared/utils/routeHelpers";
|
||||
|
||||
type Props = {
|
||||
|
Reference in New Issue
Block a user