Status: extract styles

This commit is contained in:
He4eT 2023-06-05 01:56:46 +03:00 committed by Alexey
commit 3062140352
4 changed files with 21 additions and 23 deletions

View file

@ -1,7 +1,9 @@
import { Link } from 'wouter-preact' import { Link } from 'wouter-preact'
import * as s from './Status.module.scss'
const fail = (details) => ( const fail = (details) => (
<div className='status fail'> <div className={[s.status, s.fail].join(' ')}>
<h1> <h1>
Error Error
</h1> </h1>
@ -22,7 +24,7 @@ const fail = (details) => (
) )
const loading = (details) => ( const loading = (details) => (
<div className='status loading'> <div className={[s.status, s.loading].join(' ')}>
{details.map((x) => (<div key={x}>{x}</div>))} {details.map((x) => (<div key={x}>{x}</div>))}
</div> </div>
) )

View file

@ -0,0 +1,17 @@
@keyframes dots0123 {
0% { content: ''; }
33% { content: '.'; }
66% { content: '..'; }
100% { content: '...'; }
}
.status {
padding: var(--inner-padding);
word-break: break-word;
&.loading > div:after {
animation: dots0123 1s infinite;
content: '';
}
}

View file

@ -111,19 +111,3 @@
.ifplayer .output .textBuffer .message.subheader { .ifplayer .output .textBuffer .message.subheader {
color: var(--accent-color); color: var(--accent-color);
} }
.status {
padding: var(--inner-padding);
}
.status.loading > div:after {
animation: dots0123 1s infinite;
content: '';
}
@keyframes dots0123 {
0% { content: ''; }
33% { content: '.'; }
66% { content: '..'; }
100% { content: '...'; }
}

View file

@ -45,8 +45,3 @@ html, body {
max-width: 800px; max-width: 800px;
} }
} }
.status {
padding: var(--inner-padding);
word-break: break-word;
}