mirror of
https://github.com/dergigi/boris.git
synced 2026-02-23 07:54:59 +01:00
feat(ui): add spinner to content loading state
- Replace text with FontAwesome spinner icon - Add loading-spinner styles for proper alignment - Improve visual feedback during content fetch
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import React from 'react'
|
||||
import ReactMarkdown from 'react-markdown'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faSpinner } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
interface ContentPanelProps {
|
||||
loading: boolean
|
||||
@@ -22,7 +24,10 @@ const ContentPanel: React.FC<ContentPanelProps> = ({ loading, title, html, markd
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="content-panel loading">
|
||||
<p>Loading content…</p>
|
||||
<div className="loading-spinner">
|
||||
<FontAwesomeIcon icon={faSpinner} spin />
|
||||
<span>Loading content…</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -287,6 +287,17 @@ body {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.loading-spinner svg {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.content-title {
|
||||
margin: 0 0 1rem 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user