Skip to content

Commit

Permalink
Add handler for Newsletter area
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperBlue committed Dec 24, 2023
1 parent 5f86a89 commit 43ccbd8
Showing 1 changed file with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
'use client'

import styles from './newsletterSubscriptionInput.module.css';
import {useState} from 'react';

import SocialMediaIcons from '@components/SocialMediaIcons/SocialMediaIcons';

import { ToastContainer, toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';


import { Button } from '@components/Button/Button';

const NewsletterSubscriptionInput = () => {

const [value, setValue] = useState("");

const onSubmit = () => {

toast.update(toastID.current, {
render : "Signe up for newsletter!",
type : toast.TYPE.SUCCESS,
autoClose : 5000
});

}

return (
<div className={`container ${styles.newsletterBox}`} style={{ paddingTop : 40, paddingBottom : 40}}>
<div className={styles.newsletterBoxInternal}>
Expand All @@ -15,21 +35,24 @@ const NewsletterSubscriptionInput = () => {
You can subscribe to our newsletter to get team updates, event insights, notifications on blog posts, and more!
</h5>
<div className={styles.newsletterInputContainer}>
<input className={styles.newsletterInput} placeholder='Your Email'/>
<input className={styles.newsletterInput} value={value} onChange={(e) => {console.log(e)}} placeholder='Your Email'/>
<Button
label={'Subscribe'}
style={{
backgroundColor : '#027bff',
'--hoverBackgroundColor' : '#015bdf'
}}
className={styles.newsletterSubmit}
onClick={() => {
console.log("TEST");
}}
/>
</div>
<div style={{display : 'flex', justifyContent : 'center', marginTop: 20}}>
<SocialMediaIcons/>
</div>
</div>

<ToastContainer/>
</div>
)
}
Expand Down

0 comments on commit 43ccbd8

Please sign in to comment.