Skip to content

Commit

Permalink
styled spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Mar 27, 2020
1 parent 866b5b0 commit 4a48f51
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/components/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,11 @@ const BookListUL = styled.ul({
gridGap: '1em',
})

function Spinner(props) {
return (
<FaSpinner
css={{animation: `${spin} 1s linear infinite`}}
aria-label="loading"
{...props}
/>
)
const Spinner = styled(FaSpinner)({
animation: `${spin} 1s linear infinite`,
})
Spinner.defaultProps = {
'aria-label': 'loading',
}

const buttonVariants = {
Expand Down

0 comments on commit 4a48f51

Please sign in to comment.