fix: improve overall rendering v2 (#15)

Follow-up of #10

Co-authored-by: Walidoux <ma.walidkorchi@icloud.com>
This commit is contained in:
Divlo
2022-03-16 11:25:44 +01:00
committed by GitHub
parent 780788d682
commit 8f74263daa
12 changed files with 133 additions and 101 deletions

View File

@ -1,13 +1,14 @@
export interface LoaderProps {
width?: number
height?: number
className?: string
}
export const Loader: React.FC<LoaderProps> = (props) => {
const { width = 50, height = 50 } = props
return (
<>
<div className={props.className}>
<div data-testid='progress-spinner' className='progress-spinner'>
<svg className='progress-spinner-svg' viewBox='25 25 50 50'>
<circle
@ -29,7 +30,6 @@ export const Loader: React.FC<LoaderProps> = (props) => {
margin: 0 auto;
width: ${width}px;
height: ${height}px;
display: inline-block;
}
.progress-spinner::before {
content: '';
@ -76,6 +76,6 @@ export const Loader: React.FC<LoaderProps> = (props) => {
}
`}
</style>
</>
</div>
)
}