♻️(frontend) parametrize spinner size

Allow passing custom spinner size.
Needed to align the spinner height with an inline button.
This commit is contained in:
lebaudantoine
2025-04-04 14:26:59 +02:00
committed by aleb_the_flash
parent d43b2857c1
commit 3ee33fc2ec
2 changed files with 4 additions and 4 deletions

View File

@@ -78,7 +78,7 @@ export const CreateMeetingButton = () => {
if (isPending) { if (isPending) {
return ( return (
<div> <div>
<Spinner /> <Spinner size={34} />
</div> </div>
) )
} }

View File

@@ -1,7 +1,7 @@
import { ProgressBar } from 'react-aria-components' import { ProgressBar } from 'react-aria-components'
import { css } from '@/styled-system/css' import { css } from '@/styled-system/css'
export const Spinner = () => { export const Spinner = ({ size = 56 }: { size?: number }) => {
const center = 14 const center = 14
const strokeWidth = 3 const strokeWidth = 3
const r = 14 - strokeWidth const r = 14 - strokeWidth
@@ -11,8 +11,8 @@ export const Spinner = () => {
{({ percentage }) => ( {({ percentage }) => (
<> <>
<svg <svg
width={56} width={size}
height={56} height={size}
viewBox="0 0 28 28" viewBox="0 0 28 28"
fill="none" fill="none"
strokeWidth={strokeWidth} strokeWidth={strokeWidth}