Sharing global styles

This commit is contained in:
Tom Moor
2017-10-26 22:42:08 -07:00
parent 4863680d86
commit fc45d6a180
53 changed files with 165 additions and 266 deletions

View File

@@ -3,7 +3,7 @@ import React from 'react';
import { observer } from 'mobx-react';
import Flex from 'components/Flex';
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
type Props = {
children: React.Element<*>,

View File

@@ -1,7 +1,7 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import { darken, lighten } from 'polished';
const RealButton = styled.button`

View File

@@ -2,7 +2,7 @@
import React from 'react';
import moment from 'moment';
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import Flex from 'components/Flex';
import Tooltip from 'components/Tooltip';
import Document from 'models/Document';

View File

@@ -4,7 +4,7 @@ import { observer } from 'mobx-react';
import { Link } from 'react-router-dom';
import Document from 'models/Document';
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import StarredIcon from 'components/Icon/StarredIcon';
import PublishingInfo from './components/PublishingInfo';

View File

@@ -2,7 +2,7 @@
import React, { Component } from 'react';
import moment from 'moment';
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import Collection from 'models/Collection';
import Document from 'models/Document';
import Flex from 'components/Flex';

View File

@@ -6,8 +6,8 @@ import { observer } from 'mobx-react';
import styled from 'styled-components';
import Portal from 'react-portal';
import Flex from 'components/Flex';
import { color } from 'styles/constants';
import { fadeAndScaleIn } from 'styles/animations';
import { color } from 'shared/styles/constants';
import { fadeAndScaleIn } from 'shared/styles/animations';
type Props = {
label: React.Element<*>,

View File

@@ -2,7 +2,7 @@
import React from 'react';
import styled from 'styled-components';
import Flex from 'components/Flex';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
const DropdownMenuItem = ({
onClick,

View File

@@ -6,7 +6,7 @@ import Portal from 'react-portal';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import PlusIcon from 'components/Icon/PlusIcon';
import BlockMenu from 'menus/BlockMenu';
import type { State } from '../types';

View File

@@ -2,7 +2,7 @@
import React from 'react';
import styled from 'styled-components';
import CopyButton from './CopyButton';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import type { Props } from '../types';
export default function Code({ children, node, readOnly, attributes }: Props) {

View File

@@ -3,7 +3,7 @@ import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import { List } from 'immutable';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import headingToSlug from '../headingToSlug';
import type { State, Block } from '../types';
import styled from 'styled-components';

View File

@@ -2,7 +2,7 @@
import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import styled from 'styled-components';
import CopyToClipboard from 'components/CopyToClipboard';

View File

@@ -2,7 +2,7 @@
import React from 'react';
import styled from 'styled-components';
import type { Props } from '../types';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
function HorizontalRule(props: Props) {
const { state, node } = props;

View File

@@ -2,7 +2,7 @@
import React, { Component } from 'react';
import styled from 'styled-components';
import type { Props } from '../types';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
class Image extends Component {
props: Props;

View File

@@ -1,6 +1,6 @@
// @flow
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
const InlineCode = styled.code`
padding: .25em;

View File

@@ -1,7 +1,7 @@
// @flow
import React, { Component } from 'react';
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import type { Props } from '../types';
export default class TodoItem extends Component {

View File

@@ -1,7 +1,7 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { fontWeight, color } from 'styles/constants';
import { fontWeight, color } from 'shared/styles/constants';
import Document from 'models/Document';
import NextIcon from 'components/Icon/NextIcon';

View File

@@ -1,7 +1,7 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
type Props = {
children: string,

View File

@@ -1,6 +1,6 @@
// @flow
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
const HelpText = styled.p`
margin-top: 0;

View File

@@ -1,6 +1,6 @@
// @flow
import React from 'react';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
export type Props = {
className?: string,

View File

@@ -2,7 +2,7 @@
import React from 'react';
import styled from 'styled-components';
import Flex from 'components/Flex';
import { size, color } from 'styles/constants';
import { size, color } from 'shared/styles/constants';
const RealTextarea = styled.textarea`
border: 0;

View File

@@ -1,6 +1,6 @@
// @flow
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
const Key = styled.kbd`
display: inline-block;

View File

@@ -3,7 +3,7 @@ import React from 'react';
import { observer } from 'mobx-react';
import Flex from 'components/Flex';
import styled from 'styled-components';
import { size } from 'styles/constants';
import { size } from 'shared/styles/constants';
type Props = {
label: React.Element<*> | string,

View File

@@ -6,7 +6,7 @@ import styled from 'styled-components';
import { observer, inject } from 'mobx-react';
import keydown from 'react-keydown';
import Flex from 'components/Flex';
import { color, layout } from 'styles/constants';
import { color, layout } from 'shared/styles/constants';
import { documentEditUrl, homeUrl, searchUrl } from 'utils/routeHelpers';
import Avatar from 'components/Avatar';

View File

@@ -1,7 +1,7 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { color } from 'styles/constants';
import { color } from 'shared/styles/constants';
import type { User, Team } from 'types';
import Flex from 'components/Flex';
@@ -28,7 +28,6 @@ const UserName = styled.div`
`;
const TeamName = styled.div`
font-family: 'Atlas Grotesk';
font-weight: bold;
color: ${color.text};
text-decoration: none;

View File

@@ -4,7 +4,7 @@ import { observable } from 'mobx';
import { observer, inject } from 'mobx-react';
import Flex from 'components/Flex';
import styled from 'styled-components';
import { color, fontWeight } from 'styles/constants';
import { color, fontWeight } from 'shared/styles/constants';
import SidebarLink from './SidebarLink';
import DropToImport from 'components/DropToImport';

View File

@@ -3,7 +3,7 @@ import React, { Component } from 'react';
import { observable, action } from 'mobx';
import { observer } from 'mobx-react';
import { NavLink } from 'react-router-dom';
import { color, fontWeight } from 'styles/constants';
import { color, fontWeight } from 'shared/styles/constants';
import styled from 'styled-components';
import Flex from 'components/Flex';
import CollapsedIcon from 'components/Icon/CollapsedIcon';

View File

@@ -2,8 +2,8 @@
import React from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import styled from 'styled-components';
import { pulsate } from 'styles/animations';
import { color } from 'styles/constants';
import { pulsate } from 'shared/styles/animations';
import { color } from 'shared/styles/constants';
import Flex from 'components/Flex';
import { randomInteger } from 'utils/random';

View File

@@ -1,8 +1,8 @@
// @flow
import React, { Component } from 'react';
import styled from 'styled-components';
import { pulsate } from 'styles/animations';
import { color } from 'styles/constants';
import { pulsate } from 'shared/styles/animations';
import { color } from 'shared/styles/constants';
import { randomInteger } from 'utils/random';
import Flex from 'components/Flex';

View File

@@ -3,8 +3,8 @@ import React from 'react';
import { observer } from 'mobx-react';
import styled from 'styled-components';
import ReactModal from 'react-modal';
import { color } from 'styles/constants';
import { fadeAndScaleIn } from 'styles/animations';
import { color } from 'shared/styles/constants';
import { fadeAndScaleIn } from 'shared/styles/animations';
import CloseIcon from 'components/Icon/CloseIcon';
import Flex from 'components/Flex';

View File

@@ -2,7 +2,7 @@
import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import styled from 'styled-components';
import { layout } from 'styles/constants';
import { layout } from 'shared/styles/constants';
import Toast from './components/Toast';
@observer class Toasts extends Component {

View File

@@ -2,8 +2,8 @@
import React, { Component } from 'react';
import styled from 'styled-components';
import { darken } from 'polished';
import { color } from 'styles/constants';
import { fadeAndScaleIn } from 'styles/animations';
import { color } from 'shared/styles/constants';
import { fadeAndScaleIn } from 'shared/styles/animations';
type Props = {
onRequestClose: () => void,