Commit a9d1521a authored by tom's avatar tom

use customized Input in modal

parent 5fb2a569
...@@ -15,6 +15,8 @@ import { ...@@ -15,6 +15,8 @@ import {
Text, Text,
Grid, Grid,
GridItem, GridItem,
FormControl,
FormLabel,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import type { TWatchlistItem } from '../../data/watchlist'; import type { TWatchlistItem } from '../../data/watchlist';
...@@ -61,18 +63,14 @@ const AddressModal: React.FC<Props> = ({ isOpen, onClose, data }) => { ...@@ -61,18 +63,14 @@ const AddressModal: React.FC<Props> = ({ isOpen, onClose, data }) => {
<Text lineHeight="30px" marginBottom="40px"> <Text lineHeight="30px" marginBottom="40px">
An Email notification can be sent to you when an address on your watch list sends or receives any transactions. An Email notification can be sent to you when an address on your watch list sends or receives any transactions.
</Text> </Text>
<Input <FormControl variant="floating" id="address" marginBottom="20px" isRequired>
placeholder="Address (0x...)*" <Input placeholder=" " onChange={ onAddressChange } value={ address || '' }/>
marginBottom="20px" <FormLabel>Address (0x...)</FormLabel>
onChange={ onAddressChange } </FormControl>
value={ address || '' } <FormControl variant="floating" id="tag" marginBottom="30px" isRequired>
/> <Input placeholder=" " onChange={ onTagChange } value={ tag || '' }/>
<Input <FormLabel>Private tag (max 35 characters)</FormLabel>
placeholder="Private tag (max 35 characters)*" </FormControl>
marginBottom="30px"
onChange={ onTagChange }
value={ tag || '' }
/>
<Text color="gray.600" fontSize="14px" marginBottom="32px"> <Text color="gray.600" fontSize="14px" marginBottom="32px">
Please select what types of notifications you will receive: Please select what types of notifications you will receive:
</Text> </Text>
......
import React from 'react'; import React from 'react';
import type { NextPage } from 'next'; import type { NextPage } from 'next';
import { Center, FormControl, Input, FormLabel } from '@chakra-ui/react'; import { Center } from '@chakra-ui/react';
import Page from '../components/Page/Page'; import Page from '../components/Page/Page';
const Home: NextPage = () => { const Home: NextPage = () => {
return ( return (
<Page> <Page>
<Center h="100%"> <Center h="100%">
<FormControl variant="floating" id="address" isRequired> Home Page
{ /* Placeholder should be present */ }
<Input placeholder=" "/>
{ /* It is important that the Label comes after the Control due to css selectors */ }
<FormLabel>Address</FormLabel>
</FormControl>
</Center> </Center>
</Page> </Page>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment