Skip to content

Commit ae68790

Browse files
committed
feat(spinner): migrate to semantic colors
1 parent 16211d9 commit ae68790

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/components/InlineSpinner/InlineSpinner.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { FC } from 'react';
21
import * as React from 'react';
2+
33
import styled, { keyframes } from 'styled-components';
44
import { compose, margin, MarginProps, ResponsiveValue, variant } from 'styled-system';
5-
import { Colors } from '../../essentials';
5+
import { getSemanticValue } from '../../utils/cssVariables';
66

77
interface InlineSpinnerProps extends MarginProps {
88
/**
@@ -51,15 +51,14 @@ const InlineSpinnerIcon: React.FC<InlineSpinnerProps> = styled.span<InlineSpinne
5151
${compose(margin, sizeVariant)}
5252
`;
5353

54-
const InlineSpinner: FC<InlineSpinnerProps> = (props: InlineSpinnerProps) => (
54+
const InlineSpinner: React.FC<InlineSpinnerProps> = ({
55+
color = getSemanticValue('text-primary'),
56+
size = 'medium',
57+
...rest
58+
}: InlineSpinnerProps) => (
5559
<span role="progressbar">
56-
<InlineSpinnerIcon {...props} />
60+
<InlineSpinnerIcon color={color} size={size} {...rest} />
5761
</span>
5862
);
5963

60-
InlineSpinner.defaultProps = {
61-
color: Colors.AUTHENTIC_BLUE_900,
62-
size: 'medium'
63-
};
64-
6564
export { InlineSpinner, InlineSpinnerProps };

0 commit comments

Comments
 (0)