Compare commits

...

6 Commits

Author SHA1 Message Date
26c2c50f23 v0.8.0 2021-04-01 10:19:52 +02:00
c591c2f0a8 Made Loader Stable
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-04-01 10:19:32 +02:00
7fe816c997 v0.7.6 2021-04-01 10:09:59 +02:00
7e28baf2aa Fixed Text
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-04-01 10:09:26 +02:00
b19992b57c v0.7.5 2021-04-01 09:57:32 +02:00
0bb84f9946 Fixed rollup config
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-04-01 09:57:08 +02:00
5 changed files with 22 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@dzeio/components",
"version": "0.7.4",
"version": "0.8.0",
"license": "MIT",
"main": "./index.js",
"types": "./types/index.d.ts",

View File

@ -13,7 +13,7 @@ export default [
autoModules: true,
mode: 'extract',
modules: {
generateScopedName: '[hash:8]'
generateScopedName: '[local][hash:5]'
}
}),
typescript({useTsconfigDeclarationDir: true}), // so Rollup can convert TypeScript to JavaScript

View File

@ -6,6 +6,7 @@
width 100%
height 7px
pointer-events none
z-index 200
top 0
&.hide

View File

@ -4,9 +4,22 @@ import { buildClassName } from '../Util'
import css from './Loader.module.styl'
interface Props {
/**
* The new Percentage (if you calculate it yourself)
*/
percent?: number
/**
* Auto random loader
*/
auto?: {
/**
* the minimum and maximum interval between two increment
*/
interval: [number, number]
/**
* the minimum and maximum incrementation (MUST be an integer)
*/
increment: [number, number]
}
}
@ -15,6 +28,11 @@ interface State {
percent?: number
}
/**
* Display a simple loading animation at the top of the page
*
* @version 1.0.0
*/
export default class Loader extends React.Component<Props, State> {
public state: State = {}

View File

@ -26,6 +26,6 @@ export default class Text extends React.Component<Props> {
return (<p className={classes}><em>{this.props.children}</em></p>)
}
return React.createElement(this.props.type || 'p', {className: classes})
return React.createElement(this.props.type || 'p', {className: classes, children: this.props.children})
}
}