mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
add loading ellipsis component
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export { default } from './loading-ellipsis';
|
||||
@@ -0,0 +1,24 @@
|
||||
.ellipsis {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ellipsis:after {
|
||||
content: '...';
|
||||
position: absolute;
|
||||
-webkit-animation: ellipsis steps(4, end) 1200ms infinite;
|
||||
animation: ellipsis steps(4, end) 1500ms infinite;
|
||||
width: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@keyframes ellipsis {
|
||||
to {
|
||||
width: 1.3em;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes ellipsis {
|
||||
to {
|
||||
width: 1.3em;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import styles from './loading-ellipsis.module.css';
|
||||
|
||||
interface LoadingEllipsisProps {
|
||||
string: string;
|
||||
}
|
||||
|
||||
const LoadingEllipsis = ({ string }: LoadingEllipsisProps) => {
|
||||
return <span className={styles.ellipsis}>{string}</span>;
|
||||
};
|
||||
|
||||
export default LoadingEllipsis;
|
||||
Reference in New Issue
Block a user