Skip to content

Commit

Permalink
Merge branch 'hotfix/button' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillermo Angeles committed Nov 13, 2023
2 parents 8e3775b + 8a0b180 commit be1f4c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/Button/ButtonSecondary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const Button = (props: Props) => {

const createAnimation = () =>{
const json = JSON.stringify(AnimationLoading);
const jsonBlack = JSON.stringify(AnimationLoadingBlack);
if(props.textColor){
//Get rgb colors
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(props.textColor);
Expand All @@ -73,11 +72,13 @@ const Button = (props: Props) => {
setLoadingAnimation(JSON.parse(temp));
}
else{
setLoadingAnimation(JSON.parse(jsonBlack));
let temp = json.replaceAll('[1,1,1]', `[${0/255},${143/255},${245/255}]`);
setLoadingAnimation(JSON.parse(temp));
}
}
else {
setLoadingAnimation(JSON.parse(jsonBlack));
let temp = json.replaceAll('[1,1,1]', `[${0/255},${143/255},${245/255}]`);
setLoadingAnimation(JSON.parse(temp));
}
}

Expand Down

0 comments on commit be1f4c8

Please sign in to comment.