Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dataDisplay/FixedIcon/fixedIcon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const Icons = (): React.ReactElement => {
'creatingInProgress',
'notOwner',
'notConnected',
'networkError',
];

return (
Expand Down
34 changes: 34 additions & 0 deletions src/dataDisplay/FixedIcon/images/networkError.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';

const icon = (
<svg
xmlns="http://www.w3.org/2000/svg"
width="90"
height="90"
viewBox="0 0 90 90">
<g fill="none" fillRule="evenodd">
<circle cx="45" cy="45" r="45" fill="#E8E7E6" />
<path
fill="#B2B5B2"
fillRule="nonzero"
d="M26.24 62c-.57 0-1.13-.15-1.623-.437a3.254 3.254 0 0 1-1.18-4.44l18.76-32.501a3.234 3.234 0 0 1 5.606 0l18.761 32.501c.286.495.436 1.057.436 1.628A3.244 3.244 0 0 1 63.76 62H26.24z"
/>
<path
fill="#E8E7E6"
fillRule="nonzero"
d="M47 49h-4V36h4zM47 55h-4v-4h4z"
/>
<circle
cx="78"
cy="78"
r="11"
fill="#FFC05F"
fillRule="nonzero"
stroke="#F7F5F5"
strokeWidth="4"
/>
</g>
</svg>
);

export default icon;
2 changes: 2 additions & 0 deletions src/dataDisplay/FixedIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import settingsChange from './images/settingsChange';
import creatingInProgress from './images/creatingInProgress';
import notOwner from './images/notOwner';
import notConnected from './images/notConnected';
import networkError from './images/networkError';

const icons = {
arrowSort,
Expand All @@ -42,6 +43,7 @@ const icons = {
creatingInProgress,
notOwner,
notConnected,
networkError,
};

export type IconType = typeof icons;
Expand Down
7 changes: 6 additions & 1 deletion src/inputs/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import ButtonMUI from '@material-ui/core/Button';
import { withStyles } from '@material-ui/core/styles';
import styled from 'styled-components';

import theme, { ThemeButtonSize } from '../../theme';
import { Icon, IconType } from '../../dataDisplay/Icon';
Expand All @@ -15,6 +16,10 @@ export interface Props extends React.ComponentPropsWithoutRef<'button'> {

type HoverColor = 'primaryHover' | 'secondaryHover' | 'errorHover';

const StyledIcon = styled(Icon)`
margin-right: 5px;
`;

const Button = ({
children,
iconType,
Expand Down Expand Up @@ -53,7 +58,7 @@ const Button = ({
return (
<BootstrapButton {...rest}>
{iconType && (
<Icon
<StyledIcon
size="md"
color={variant === 'contained' ? 'white' : color}
type={iconType}
Expand Down