Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added IE http loading #388

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
25 changes: 25 additions & 0 deletions src/IELoading/IELoading.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { IELoading } from 'react95';
import styled from 'styled-components';

const Wrapper = styled.div`
background: ${({ theme }) => theme.material};
padding: 5rem;
`;

export default {
title: 'Controls/IELoading',
component: IELoading,
decorators: [story => <Wrapper>{story()}</Wrapper>]
} as ComponentMeta<typeof IELoading>;

export function Default() {

return <IELoading />;
}

Default.story = {
name: 'default'
};

25 changes: 25 additions & 0 deletions src/IELoading/IELoading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react';
import styled from 'styled-components';
import IELoadingGIF from '../assets/images/IELoading.gif'

type ProgressBarProps = {
width?: number
} & React.HTMLAttributes<HTMLImageElement>;

const GIFContainer = styled.img`
width: ${(props) => `${props.width}px`}
height: auto;
`;

const IELoading = (props:ProgressBarProps) => {
const { width = 250 } = props
return (
<>
<GIFContainer src={IELoadingGIF} width={width}/>
</>
)
}

IELoading.displayName = 'IELoading';

export { IELoading, ProgressBarProps };
Binary file added src/assets/images/IELoading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export * from './Toolbar/Toolbar';
export * from './Tooltip/Tooltip';
export * from './TreeView/TreeView';
export * from './Window/Window';
export * from './IELoading/IELoading';

/* deprecated components */
export * from './legacy/Bar';
Expand Down
5 changes: 5 additions & 0 deletions types/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ declare module '*.png' {
export = value;
}

declare module '*.gif' {
const value: string;
export = value;
}

declare module '*.woff2' {
const value: string;
export = value;
Expand Down