Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
ohansFavour committed Aug 29, 2024
1 parent 510ab14 commit 6e37ee2
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion lib/build/emailverification-shared2.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/build/index2.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/multifactorauthprebuiltui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/passwordlessprebuiltui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/sessionprebuiltui.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions lib/build/thirdparty-shared.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/thirdpartyprebuiltui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/totpprebuiltui.js

Large diffs are not rendered by default.

32 changes: 0 additions & 32 deletions lib/ts/recipe/emailpassword/components/themes/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -191,35 +191,3 @@
[data-supertokens~="resetPasswordPasswordForm"] {
padding-bottom: 20px;
}
[data-supertokens~="buttonWithArrow"] {
border-radius: 6px;
border: 1px solid #d0d5dd;
width: 100%;
color: rgb(var(--palette-textGray));
display: flex;
justify-content: center;
align-items: center;
gap: 5px;
margin: 24px 0;
min-height: 48px;
cursor: pointer;
}
[data-supertokens~="buttonWithArrow"]:hover {
background-color: rgb(var(--palette-inputBackground));
}
[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryText"] {
font-weight: 700;
font-size: var(--font-size-2);
color: rgb(var(--palette-textGray));
margin: 0;
}

[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithRightArrow"] ~ svg {
position: relative;
left: 2px;
}

[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryLinkWithLeftArrow"] {
display: flex;
align-items: center;
}
12 changes: 6 additions & 6 deletions lib/ts/recipe/thirdparty/components/library/providerButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@
* under the License.
*/

import { useEffect, useRef } from "react";
import { useLayoutEffect, useRef } from "react";

import { useTranslation } from "../../../../translation/translationContext";

const isTextOverflowing = (element: Element) => {
return element.scrollWidth > element.clientWidth;
};

export type ProviderButtonProps = {
providerName: string;
displayName: string;
Expand All @@ -30,11 +34,7 @@ export default function ProviderButton({ logo, providerName, displayName }: Prov

const SCROLL_ANIMATION_CLASS = "scroll-text-animation";

const isTextOverflowing = (element: Element) => {
return element.scrollWidth > element.clientWidth;
};

useEffect(() => {
useLayoutEffect(() => {
const buttonTextContainer = buttonTextContainerRef.current;
if (buttonTextContainer && isTextOverflowing(buttonTextContainer)) {
buttonTextContainer.classList.add(SCROLL_ANIMATION_CLASS);
Expand Down
32 changes: 32 additions & 0 deletions lib/ts/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,35 @@
[data-supertokens~="authComponentList"] {
padding-bottom: 20px;
}
[data-supertokens~="buttonWithArrow"] {
border-radius: 6px;
border: 1px solid #d0d5dd;
width: 100%;
color: rgb(var(--palette-textGray));
display: flex;
justify-content: center;
align-items: center;
gap: 5px;
margin: 24px 0;
min-height: 48px;
cursor: pointer;
}
[data-supertokens~="buttonWithArrow"]:hover {
background-color: rgb(var(--palette-inputBackground));
}
[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryText"] {
font-weight: 700;
font-size: var(--font-size-2);
color: rgb(var(--palette-textGray));
margin: 0;
}

[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithRightArrow"] ~ svg {
position: relative;
left: 2px;
}

[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryLinkWithLeftArrow"] {
display: flex;
align-items: center;
}

0 comments on commit 6e37ee2

Please sign in to comment.