♻️(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) {
return (
<div>
<Spinner />
<Spinner size={34} />
</div>
)
}

View File

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