-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ACT-1296: Infura Faucet Integration in MetaMask Docs (#1396)
* ACT-1390: Faucet page routing * ACT-1387, ACT-1387: Tabs, Button ACT-1388: Component: Button ACT-1387: Component: Tabs * ACT-1393 Component: Typography (#1410) * ACT-1393 Component: Typography * ACT-1386 Component: Accordion * Faucet alerts + prettier (#1423) * ACT-1394 Component: Alert + Prettier whole project * feat(faucet): act-1391 - added badge component (#1425) * feat(faucet): act-1391 - added badge component * feat(faucet): act-1391 - fix for css vars * feat(docs): act-1392 - added table component (#1439) * eslint + prettier fix for src (#1440) * ACT-1473 Assemble faucet page (#1448) ACT-1473 Assemble faucet page (#1448) * ACT-1473 Assemble faucet page * ESlint + Prettier * Improve types and aliases resolving * feat(m-login): adding full login flow * feat(m-login): fix build * feat(m-login): fixing link unfurling * feat(m-login): implementing multiple wallet pairing * feat(mm-login): updating dashboard preview url * feat(mm-login): updating dashboard preview url * feat(mm-login): hardcode dashboard preview url * Faucet maintenance mode (#1475) Faucet maintenance mode (#1475) * Faucet supports MM login flow * Handle MetaMask sdk using common sdk * Handle auth Infura connection * Faucet Hero img * Fix SSR * Fix BrowserOnly * Handle stale data * Get transactions * Unified login interface for MM Docs via MM Wallet * Unified login interface for MM Docs via MM Wallet * Unified login interface for MM Docs via MM Wallet * Unified login interface for MM Docs via MM Wallet * Faucet in MetaMask implementation * feat(unified-login): update unified login * feat(unified-login): update unified login flow * feat(unified-login): update unified login flow * feat(unified-login): update unified login flow * feat(unified-login): update unified login flow * feat(unified-login): add feature flag to manage login button * feat(unified-login): fix bug on refreshing page * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): update dahboard_url function call * feat(reference): imp for reference pages (#1471) * feat(reference): imp for reference pages * feat(reference): fix for default data * feat(reference): fix for param struct data * feat(docs):ACT-1500 - Add Wallet ID to Default Values (#1477) * added address from connected wallet * added constants * Fix typo in Snaps JSX documentation (#1482) * Sync Starknet Infura content changes (#1483) * Sync Starknet Infura content changes * Update whats-new on starknet methods * Update link * Update spacing * Update docs/whats-new.md --------- Co-authored-by: Alexandra Carrillo <[email protected]> * feat(unified-login): update unified login * feat(unified-login): update unified login flow * feat(unified-login): update unified login flow * feat(unified-login): update unified login flow * feat(unified-login): update unified login flow * minor update (#1484) * fixes links: assume that Infura --> MM docs does not map exactly (#1488) * feat(unified-login): add feature flag to manage login button * feat(unified-login): fix bug on refreshing page * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): fix dahboard url * feat(unified-login): update dahboard_url function call * Faucet in MetaMask implementation * Faucet in MetaMask implementation * Improve faucet UI/UX * Improve ui and ux * Improve ui and ux * clear data on disconnect * # Conflicts: # src/components/AuthLogin/AuthModal.tsx # src/lib/siwsrp/auth.ts # src/theme/Root.tsx * Small bugfixes * Implement segment events tracking * Fix low balance alert * fix linting * fix linting * fix linting * revert structure back * Improve linking Infura account(s) * Fix yarn mention * Apply suggestions from code review * Update src/components/Faucet/Faq.tsx --------- Co-authored-by: Vlad Lo. <vlad.lobachov-ext@> Co-authored-by: TrofimovAnton85 <[email protected]> Co-authored-by: Magne Cedric <[email protected]> Co-authored-by: Denys Nikanov <[email protected]> Co-authored-by: Frederik Bolding <[email protected]> Co-authored-by: Joan E <[email protected]> Co-authored-by: Alexandra Carrillo <[email protected]> Co-authored-by: m4sterbunny <[email protected]>
- Loading branch information
1 parent
67e0fa3
commit 87d2dfa
Showing
41 changed files
with
1,970 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
:root[data-theme="dark"] { | ||
--accordion-background: #24272a; | ||
--accordion-border: rgba(132, 140, 150, 0.16); | ||
} | ||
|
||
:root[data-theme="light"] { | ||
--accordion-background: #ffffff; | ||
--accordion-border: rgba(187, 192, 197, 0.4); | ||
} | ||
|
||
.accordion { | ||
background: var(--accordion-background); | ||
border: 1px solid var(--accordion-border); | ||
border-radius: 8px; | ||
margin-bottom: 24px; | ||
|
||
.header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
cursor: pointer; | ||
|
||
.closeButton { | ||
cursor: pointer; | ||
margin-left: 24px; | ||
margin-right: 24px; | ||
display: block; | ||
height: 16px; | ||
line-height: 1; | ||
|
||
.image { | ||
min-width: 16px; | ||
width: 16px; | ||
min-height: 16px; | ||
height: 16px; | ||
transition: all 0.5s; | ||
transform: rotate(45deg); | ||
|
||
&.opened { | ||
transform: rotate(0); | ||
} | ||
} | ||
} | ||
} | ||
|
||
.content { | ||
visibility: hidden; | ||
display: none; | ||
|
||
&.opened { | ||
visibility: visible; | ||
display: block; | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React, { useState } from "react"; | ||
import clsx from "clsx"; | ||
import styles from "./accordion.module.scss"; | ||
import CloseImg from "./close.svg"; | ||
import { trackClickForSegment } from "@site/src/lib/segmentAnalytics"; | ||
|
||
interface IAccordion { | ||
children: [React.ReactElement, React.ReactElement]; | ||
opened?: boolean; | ||
} | ||
|
||
export default function Accordion({ | ||
children: [title, body], | ||
opened = false, | ||
}: IAccordion) { | ||
const [isOpened, setIsOpened] = useState(opened); | ||
|
||
const handleToggle = () => { | ||
trackClickForSegment({ | ||
eventName: `${isOpened ? "Expanded" : "Collapsed"} - ${title}`, | ||
clickType: "Accordion", | ||
userExperience: "B", | ||
responseStatus: null, | ||
responseMsg: null, | ||
timestamp: Date.now(), | ||
}); | ||
setIsOpened((value) => !value); | ||
}; | ||
|
||
return ( | ||
<div className={styles.accordion}> | ||
<div | ||
role="button" | ||
data-testid="accordion-title" | ||
onClick={handleToggle} | ||
className={styles.header} | ||
> | ||
{title} | ||
<span | ||
role="button" | ||
data-testid="accordion-button-x" | ||
className={styles.closeButton} | ||
> | ||
<CloseImg className={clsx(styles.image, isOpened && styles.opened)} /> | ||
</span> | ||
</div> | ||
<div className={clsx(styles.content, isOpened && styles.opened)}> | ||
{body} | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
:root { | ||
--badge-default-color: #6a737d; | ||
--badge-default-bg-color: #f2f4f6; | ||
--badge-default-border-color: transparent; | ||
--badge-success-color: #1c8234; | ||
--badge-success-bg-color: rgba(28, 130, 52, 0.1); | ||
--badge-error-color: #d73847; | ||
--badge-error-bg-color: rgba(215, 56, 71, 0.1); | ||
} | ||
|
||
:root[data-theme="dark"] { | ||
--badge-default-color: #bbc0c5; | ||
--badge-default-bg-color: #24272a; | ||
--badge-default-border-color: #bbc0c5; | ||
--badge-success-color: #28a745; | ||
--badge-success-bg-color: rgba(40, 167, 69, 0.15); | ||
--badge-error-color: #e06470; | ||
--badge-error-bg-color: rgba(224, 100, 112, 0.15); | ||
} | ||
|
||
.badge { | ||
display: inline-flex; | ||
align-items: center; | ||
font-size: 12px; | ||
line-height: 20px; | ||
font-weight: 500; | ||
letter-spacing: 0.25px; | ||
border-radius: 999px; | ||
border: 1px solid var(--badge-default-border-color); | ||
padding: 2px 8px; | ||
color: var(--badge-default-color); | ||
background-color: var(--badge-default-bg-color); | ||
text-transform: capitalize; | ||
|
||
&.success { | ||
color: var(--badge-success-color); | ||
background-color: var(--badge-success-bg-color); | ||
border-color: transparent; | ||
} | ||
|
||
&.error { | ||
color: var(--badge-error-color); | ||
background-color: var(--badge-error-bg-color); | ||
border-color: transparent; | ||
} | ||
} |
Oops, something went wrong.