Skip to content

Commit b2042f2

Browse files
committed
docs: enhance loading button example using spinner
1 parent f28673c commit b2042f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

www/docs/examples/Button/Loading.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useEffect, useState } from 'react';
22
import Button from 'react-bootstrap/Button';
3+
import Spinner from 'react-bootstrap/Spinner';
34

45
function LoadingButton() {
56
const [isLoading, setLoading] = useState(false);
@@ -26,7 +27,7 @@ function LoadingButton() {
2627
disabled={isLoading}
2728
onClick={!isLoading ? handleClick : null}
2829
>
29-
{isLoading ? 'Loading…' : 'Click to load'}
30+
{isLoading ? <Spinner size="sm" /> : 'Click to load'}
3031
</Button>
3132
);
3233
}

0 commit comments

Comments
 (0)