main v0.1.0
HerrHase 2 years ago
parent ef6a902252
commit 9f26abd582

@ -2,7 +2,7 @@
Created with [Riot.js](https://riot.js.org) Created with [Riot.js](https://riot.js.org)
Loading as Riot-Component from [Plain-UI](https://plain-ui.com) Loading Indicator from [Plain-UI](https://plain-ui.com) in Riot.
## Install ## Install
@ -10,3 +10,9 @@ Loading as Riot-Component from [Plain-UI](https://plain-ui.com)
npm install @tiny-components\loading --save npm install @tiny-components\loading --save
``` ```
## How to use
```
<tiny-loading active={ state.isActive }></tiny-loading>
```

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -3,8 +3,8 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Tiny Components | Notification</title> <title>Tiny Components | Loading</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" /> <link rel="icon" href="data:,">
<link href="/example.css" rel="stylesheet" type="text/css"> <link href="/example.css" rel="stylesheet" type="text/css">
</head> </head>

@ -4,9 +4,9 @@
<input class="field-choice" type="checkbox" name="radio" value="true" onchange={ () => { handleSwitch() } }> <input class="field-choice" type="checkbox" name="radio" value="true" onchange={ () => { handleSwitch() } }>
<span class="field-switch"></span> <span class="field-switch"></span>
</label> </label>
<div class="panel" if={ state.active }> <div class="panel" if={ state.isActive }>
<div class="panel__body"> <div class="panel__body">
<tiny-loading active={ state.active }></tiny-loading> <tiny-loading active={ state.isActive }></tiny-loading>
</div> </div>
</div> </div>
</div> </div>
@ -15,7 +15,7 @@
export default { export default {
state: { state: {
active: false isActive: false
}, },
/** /**
@ -24,10 +24,10 @@
*/ */
handleSwitch() handleSwitch()
{ {
if (this.state.active === true) { if (this.state.isActive === true) {
this.state.active = false this.state.isActive = false
} else { } else {
this.state.active = true this.state.isActive = true
} }
this.update() this.update()

Loading…
Cancel
Save