From 2fae02293b5b99028ee61502901e497faae9843c Mon Sep 17 00:00:00 2001 From: Artem Khaydarov Date: Fri, 15 Sep 2023 16:45:39 +0300 Subject: [PATCH] Revert "fix(plasma-core): add default uniqId for Spinner" This reverts commit ff105117bc6ebaae10b0dc20eba170f01417431c. --- .../plasma-core Spinner -- many colors.snap.png | Bin 4917 -> 0 bytes .../Spinner/Spinner.component-test.tsx | 13 ------------- .../src/components/Spinner/Spinner.tsx | 7 ++----- 3 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 cypress/snapshots/ui/components/Spinner/SpinnerBase.component-test.tsx/plasma-core Spinner -- many colors.snap.png diff --git a/cypress/snapshots/ui/components/Spinner/SpinnerBase.component-test.tsx/plasma-core Spinner -- many colors.snap.png b/cypress/snapshots/ui/components/Spinner/SpinnerBase.component-test.tsx/plasma-core Spinner -- many colors.snap.png deleted file mode 100644 index f4ff81a679b689f0be11aa4b5352d7502a9c6ff9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4917 zcmeHLZBSd+nZAzOl66{WH=B(L2u(Mg@$9le!3KW_ORPVNH)V@3HWw_u(rSZjM36xU zh=fpD*JZjvFqv$saWD{~ve>#@0g)9zvcNHGX<{rX81BUwgiIAIxR(zT=?Wx})FV0l z+3Ej|f1E!$=f3ZA-t)ZA`;2~{n{)aH`{MUO5cGpL|MOHH1nu!g){EZ*zf9oH|AC-? z+dS zzPWP6d&hVpe7W=w|NJO#pQ%C=>rGs3dq1!8;vaiY<+PxAKYfz;i%+Lc32Vy_RQv9i z3QdyFE^@!?U)OJ~nij9P-!&`z#75sn=xNMe$d|qs`uy-;S@o;`YHTEXsD=D`Asse7 zJSmz!(q<@g3DthtLFnyhqFtUyXTCt_ti;eH3DddN2uR)K$ zq{~z(jNw|pEt@V|&NH3yYza1K{Yn_2z9HzO38DU^Dbg>D@tmK>_qW8BalQi`yUOQY zuwqLt75)+;k{X{B2we49uC>W%b>iKp4k=6AuDoqXFistABhDH+{)Ahi?T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*+db9``ou`A6Cpd`KH zqnSZQ9V?&tIo{p7RO2t~opNegt^O;mma&(k`mu%)rRm74MP!1qns6NH3ZDQ+s?aSE z!6+g3gE>^cnyNe_G?mJ;(=|qvg89dmt5Hcm$OX7syFqgu1_yiNT@)Y=UG@UMk4Qiz z#*eXXeYr$qQ%)-Jz*}w)w~iI8rE0+O0)u?#ta6hF-F6-IrL=6;36&M+)XlM|UW1)P z0=aHa+YsK&BX^9&p~~>s3@a(zWN|sa4>cUHEcB$pdc&8&ov~a8*(OED7a8@(LJq*c zZzaU<0X%thZEXHprjr&1^eqEQMYnWbo*Pp93-oyQ>KA>BvFzgomnM3) zP%LBNdQ-J6t?Dr1F*tXOE8k!*M;+7^!OXo*j?YbdEg%kVj z?q{1BIB}d}SeCz_v6DrulVewPeCnj|yOGhl&p84E=7X#{--de?23WvD{6nPM_H7g) zG1!cG*_tZFLnJMT)96TBSxVFlEapfwr7M2_{56M$^BMeX1ohQb4}A8&j%AdeCjSB1Q4h@MSlt9 zU_{MG@;pO*miiMgABy#w6__IVQSWob*`IW7NaNzMg-$)pC_?zu$hQ#^_+D6|S*KRz zMB_Rv84Gy9oCL!7Q7J~Mj}&axy;A(*KGX2Q-wWQt}=P%JjCi@I`50(6vP8o*OJ)IY$8{L6NXFughc6fMy-LEzvl6*hJuBZG`ikcG`m&G$ z=rZLjswOUYk0vL4Yo!UGgqw-7R~M4hgRnZDU3(qpp-DWfS;NTe+WCqn5A%Yv6FuQ| zJ+Z-P3tA(1BTfXTp;f+@wl?bfGYLJxV8jL;u0f{qN6^!+TiG$0nSxB|h<8Hl^N4+2 z=H;@)*gX)}GU$H1zsea4HPn?uw|&po^BO$oz;g~f=fK|=2SN#D|8{igesSAf@OK#W O=Ff6YX-~ZMn?D1aqj^;T diff --git a/packages/plasma-core/src/components/Spinner/Spinner.component-test.tsx b/packages/plasma-core/src/components/Spinner/Spinner.component-test.tsx index 92114f3a1a..cb5fe7270a 100644 --- a/packages/plasma-core/src/components/Spinner/Spinner.component-test.tsx +++ b/packages/plasma-core/src/components/Spinner/Spinner.component-test.tsx @@ -56,17 +56,4 @@ describe('plasma-core: Spinner', () => { ); cy.matchImageSnapshot(); }); - - it('many colors', () => { - mount( - - - - - - - , - ); - cy.matchImageSnapshot(); - }); }); diff --git a/packages/plasma-core/src/components/Spinner/Spinner.tsx b/packages/plasma-core/src/components/Spinner/Spinner.tsx index e7e65a2664..b6d7393281 100644 --- a/packages/plasma-core/src/components/Spinner/Spinner.tsx +++ b/packages/plasma-core/src/components/Spinner/Spinner.tsx @@ -2,7 +2,6 @@ import React from 'react'; import styled, { keyframes, css } from 'styled-components'; import { accent } from '../../tokens'; -import { useUniqId } from '../../hooks'; import { SpinnerSvg } from './SpinnerSvg'; @@ -49,13 +48,11 @@ const sizeFormatting = (size: number | string, deviceScale = 1): string => { */ export const Spinner: React.FC = (props) => { const { id, size = 56, color = accent, deviceScale, ...rest } = props; - const uniqId = useUniqId(); - const innerId = id || uniqId; const currentSize = sizeFormatting(size, deviceScale); return ( - - + + ); };