I am trying to put an icon inside an input, to the left. tailwindcss has a library for ReactJS with SVG and components as icons: https://heroicons.com/.
My component:
import React from 'react'
import { MailIcon } from '@heroicons/react/solid'
const BlogPost = () => (
<section className="container-full flex flex-col m-20">
<h2 className="mx-auto uppercase font-bold">Check my blogpost</h2>
<form action="POST" className="mx-auto mt-5 w-6/12">
<label htmlFor="email">
<MailIcon className="w-8 h-8" />
<input className="form-input w-full" type="email" name="email" id="email" placeholder="email@kemuscorp.com" />
</label>
</form>
</section>
)
export default BlogPost
As you see, the MailIcon components can receive tailwindcss. Any idea to incrust the icon inside the input?