Skip to content

Commit

Permalink
feat(component): making loader configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirohonda committed Feb 21, 2022
1 parent 0107d6c commit 8a0b205
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import React from 'react';
import { CubeLoadingSpinner } from './CubeLoadingSpinner';
import React from "react";
import { CubeLoadingSpinner } from "./CubeLoadingSpinner";

const App = () => (
<div style={{ margin: '100px 100px' }}>
<CubeLoadingSpinner />
<div style={{ margin: "100px 100px" }}>
<CubeLoadingSpinner
mainColor="black"
secondaryColor="gray"
spinnerWidth="28px"
spinnerSpeed="1.5s"
/>
</div>
);

Expand Down
3 changes: 2 additions & 1 deletion src/CubeLoadingSpinner/CubeLoadingSpinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ interface CubeLoadingSpinnerProps {
export const CubeLoadingSpinner: React.VFC<CubeLoadingSpinnerProps> = ({
mainColor = "#141b4d",
secondaryColor = "#00c389",
spinnerWidth = "32px",
// 32 looks wired, 30 and 34 works...
spinnerWidth = "30px",
spinnerSpeed = "1.5s",
}) => (
<CssVariables
Expand Down

0 comments on commit 8a0b205

Please sign in to comment.