Fix isInternalUrl for subdomain support

Refactor / reduce plumbing
This commit is contained in:
Tom Moor
2018-11-18 18:43:11 -08:00
parent cd1956b971
commit 032d843f5b
51 changed files with 13 additions and 98 deletions

36
app/components/Alert.js Normal file
View File

@@ -0,0 +1,36 @@
// @flow
import * as React from 'react';
import { observer } from 'mobx-react';
import Flex from 'shared/components/Flex';
import styled from 'styled-components';
type Props = {
children: React.Node,
type?: 'info' | 'success' | 'warning' | 'danger' | 'offline',
};
@observer
class Alert extends React.Component<Props> {
defaultProps = {
type: 'info',
};
render() {
return (
<Container align="center" justify="center" type={this.props.type}>
{this.props.children}
</Container>
);
}
}
const Container = styled(Flex)`
height: $headerHeight;
color: #ffffff;
font-size: 14px;
line-height: 1;
background-color: ${({ theme, type }) => theme.color[type]};
`;
export default Alert;