Skip to content

Commit

Permalink
Update src/components/Spinner/Spinner.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Sénéchal <[email protected]>
  • Loading branch information
Thykof and thomas-senechal authored Feb 26, 2024
1 parent a175056 commit f3ce4ca
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ interface SpinnerProps {
export function Spinner(props: SpinnerProps) {
const { customClass = '', size = 'sm', color = 'neutral' } = props;

const isSmall = size === 'sm';
const isMedium = size === 'md';
const sizeClass = isSmall
? 'w-6 h-6'
: isMedium
? 'w-8 h-8'
: 'w-12 h-12 border-4';
const sizeToClass = {
sm: 'w-6 h-6',
md: 'w-8 h-8',
lg: 'w-12 h-12 border-4',
};

const sizeClass = sizeToClass[size] || sizeToClass['lg'];

return (
<div
Expand Down

0 comments on commit f3ce4ca

Please sign in to comment.