Skip to content

Commit

Permalink
feat: added Loader component
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala committed Jun 26, 2018
1 parent 7148ca1 commit 8ad2268
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/components/Loader/Loader.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.ui.loader:before {
border-color: var(--secondary) !important;
}

.ui.loader:after {
border-color: var(--primary) transparent transparent !important;
}
7 changes: 7 additions & 0 deletions src/components/Loader/Loader.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from 'react'
import { storiesOf } from '@storybook/react'
import { Loader } from '../..'

storiesOf('Loader', module)
.add('Main Loader', () => <Loader active size="massive" />)
.add('Tiny Loader', () => <Loader active size="mini" />)
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import './themes/light-theme.css'

// Semantic components themes
import './components/Button/Button.css'
import './components/Radio/Radio.css'
import './components/Header/Header.css'
import './components/Loader/Loader.css'
import './components/Radio/Radio.css'
import './components/Table/Table.css'

// Decentraland components
Expand Down
60 changes: 60 additions & 0 deletions test/coverage/__snapshots__/coverage.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,66 @@ exports[`Decentraland UI - Coverage Tests Header Subheader + Header 1`] = `
</div>
`;

exports[`Decentraland UI - Coverage Tests Loader Main Loader 1`] = `
<div
style={
Object {
"alignItems": "center",
"bottom": 0,
"display": "flex",
"left": 0,
"overflow": "auto",
"position": "fixed",
"right": 0,
"top": 0,
}
}
>
<div
style={
Object {
"margin": "auto",
"maxHeight": "100%",
}
}
>
<div
className="ui massive active loader"
/>
</div>
</div>
`;

exports[`Decentraland UI - Coverage Tests Loader Tiny Loader 1`] = `
<div
style={
Object {
"alignItems": "center",
"bottom": 0,
"display": "flex",
"left": 0,
"overflow": "auto",
"position": "fixed",
"right": 0,
"top": 0,
}
}
>
<div
style={
Object {
"margin": "auto",
"maxHeight": "100%",
}
}
>
<div
className="ui mini active loader"
/>
</div>
</div>
`;

exports[`Decentraland UI - Coverage Tests Logo Decentraland 1`] = `
<div
style={
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8ad2268

Please sign in to comment.