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

Dapp 1767 spinner #1786

Merged
merged 7 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/blocks/spinner/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Container = styled.div<{ css?: FlattenSimpleInterpolation; size: SpinnerSi
${({ size, variant }) => `
border-width: var(--${getSpinnerStrokeWidth(size)}) ;
border-style: solid;
border-color: var(--components-spin-loader-spinner-${variant})
border-color: var(--components-spinner-icon-${variant})
transparent transparent transparent;
width: ${getSpinnerSize(size)};
height: ${getSpinnerSize(size)};
Expand All @@ -37,7 +37,7 @@ const Container = styled.div<{ css?: FlattenSimpleInterpolation; size: SpinnerSi
width: var(--${getSpinnerStrokeWidth(size)});
height: var(--${getSpinnerStrokeWidth(size)});
border-radius: 50%;
background: var(--components-spin-loader-spinner-${variant});
background: var(--components-spinner-icon-${variant});
position: absolute;
}
:before {
Expand All @@ -54,7 +54,7 @@ const Container = styled.div<{ css?: FlattenSimpleInterpolation; size: SpinnerSi
${(props) => props.css || ''};
`;

const Spinner: React.FC<SpinnerProps> = ({ size = 'small', css, variant = 'primary' }) => {
const Spinner: React.FC<SpinnerProps> = ({ size = 'small', css, variant = 'default' }) => {
return (
<Container
size={size}
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/spinner/Spinner.types.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export type SpinnerSize = 'small' | 'medium' | 'large' | 'extraLarge';
export type SpinnerVariant = 'primary' | 'secondary';
export type SpinnerVariant = 'default' | 'secondary';
4 changes: 2 additions & 2 deletions src/blocks/theme/colors/colors.semantics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type SemanticKeys = {
toast: 'components-toast';
toggle: 'components-toggle-switch';
tooltip: 'components-tooltip';
spinner: 'components-spin-loader';
spinner: 'components-spinner';
};

export const semanticKeys: SemanticKeys = {
Expand All @@ -71,7 +71,7 @@ export const semanticKeys: SemanticKeys = {
toast: 'components-toast',
toggle: 'components-toggle-switch',
tooltip: 'components-tooltip',
spinner: 'components-spin-loader',
spinner: 'components-spinner',
};

export const colorSemantics = {
Expand Down
5 changes: 2 additions & 3 deletions src/blocks/theme/semantics/semantics.spinner.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { colorBrands } from '../colors/colors.brands';
import { surfaceSemantics } from './semantics.surface';

export const spinnerSemantics = {
'spinner-primary': { light: colorBrands['primary-500'], dark: colorBrands['primary-500'] },
'spinner-secondary': { light: colorBrands['neutral-1000'], dark: colorBrands['neutral-100'] },
'icon-default': { light: colorBrands['primary-500'], dark: colorBrands['primary-500'] },
'icon-secondary': { light: colorBrands['neutral-1000'], dark: colorBrands['neutral-100'] },
};
Loading