♻️(frontend) parametrize spinner size
Allow passing custom spinner size. Needed to align the spinner height with an inline button.
This commit is contained in:
committed by
aleb_the_flash
parent
d43b2857c1
commit
3ee33fc2ec
@@ -78,7 +78,7 @@ export const CreateMeetingButton = () => {
|
||||
if (isPending) {
|
||||
return (
|
||||
<div>
|
||||
<Spinner />
|
||||
<Spinner size={34} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user