mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-08 17:32:27 +08:00
- Replace .eslintrc.json with eslint.config.mjs - Simplify configuration using @antfu/eslint-config - Add necessary ESLint plugin dependencies - Disable overly strict style rules - Set package.json type to module for ESM support - Fix ESLint disable comment format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
748 B
TypeScript
25 lines
748 B
TypeScript
import type { FC } from 'react'
|
|
import React from 'react'
|
|
|
|
interface Props {
|
|
loading?: boolean
|
|
className?: string
|
|
children?: React.ReactNode | string
|
|
}
|
|
|
|
const Spinner: FC<Props> = ({ loading = false, children, className }) => {
|
|
return (
|
|
<div
|
|
className={`inline-block text-gray-200 h-4 w-4 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] ${loading ? 'motion-reduce:animate-[spin_1.5s_linear_infinite]' : 'hidden'} ${className ?? ''}`}
|
|
role="status"
|
|
>
|
|
<span
|
|
className="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
|
>Loading...</span>
|
|
{children}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Spinner
|