-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Substrate dripping in the faucet (#147)
* feat: Faucet update to support Substrate dripping * Modify url * Update condition check * Insert faucet UI in examples * Correct the instruction in the example * Align with new REST endpoints * Reseting states fix * Update faucet path
- Loading branch information
Showing
7 changed files
with
105 additions
and
30 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
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,37 @@ | ||
import * as React from "react"; | ||
import Box from "@mui/material/Box"; | ||
import InputLabel from "@mui/material/InputLabel"; | ||
import MenuItem from "@mui/material/MenuItem"; | ||
import FormControl from "@mui/material/FormControl"; | ||
import Select from "@mui/material/Select"; | ||
|
||
export default function NetworkSelect({ networkTypes, setSelectedNetworkType }) { | ||
const [network, setNetwork] = React.useState(""); | ||
|
||
const handleChange = (event) => { | ||
setSelectedNetworkType(event.target.value); | ||
setNetwork(event.target.value); | ||
}; | ||
|
||
return ( | ||
<Box sx={{ minWidth: 120, marginTop: 2, marginBottom: 2 }}> | ||
<FormControl fullWidth> | ||
<InputLabel id="network-select-label">Network Type</InputLabel> | ||
<Select | ||
labelId="network-type-label" | ||
id="network-type-select" | ||
value={network} | ||
label="Network Type" | ||
onChange={handleChange} | ||
required | ||
sx={{ textTransform: "capitalize" }} | ||
> | ||
|
||
{networkTypes.map((networkType) => ( | ||
<MenuItem key={networkType} value={networkType}>{networkType}</MenuItem> | ||
))} | ||
</Select> | ||
</FormControl> | ||
</Box> | ||
); | ||
} |
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