Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the spinner animation default to border #6468

Merged
merged 2 commits into from Nov 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/Spinner.tsx
Expand Up @@ -9,7 +9,7 @@ import { Variant } from './types';
export interface SpinnerProps
extends React.HTMLAttributes<HTMLElement>,
BsPrefixProps {
animation: 'border' | 'grow';
animation?: 'border' | 'grow';
size?: 'sm';
variant?: Variant;
}
Expand Down Expand Up @@ -64,7 +64,7 @@ const Spinner: BsPrefixRefForwardingComponent<'div', SpinnerProps> =
{
bsPrefix,
variant,
animation,
animation = 'border',
size,
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
as: Component = 'div',
Expand All @@ -75,7 +75,6 @@ const Spinner: BsPrefixRefForwardingComponent<'div', SpinnerProps> =
) => {
bsPrefix = useBootstrapPrefix(bsPrefix, 'spinner');
const bsSpinnerPrefix = `${bsPrefix}-${animation}`;

return (
<Component
ref={ref}
Expand Down