Added copy button and description input type

This commit is contained in:
Daniel Cojocea committed 2024-07-13 14:17:04 -04:00
1 parent a84b340d6e
commit 51ce98f5e9
3 files changed
+139 -66

No files matched your search

+59 -41
View File
@@ -1,12 +1,8 @@
import React from "react";
import EmailTextField from "../../Components/TextFields/Email/EmailTextField";
import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
import HelpOutlineIcon from "@mui/icons-material/HelpOutline";
import WebsiteTextField from "../../Components/TextFields/Website/WebsiteTextField";
import DescriptionTextField from "../../Components/TextFields/Description/DescriptionTextField";
import PlayGroundCharts from "./PlayGround-Charts";
import PlayGroundPopupModals from "./PlayGround-Popup-Modals";
import PlayGroundTooltips from "./PlayGround-Tooltips";
import Field from "../../Components/TextFields/Field";
// This Component is just for the development and test
// purposes and just to see what my components look like while development
@@ -15,49 +11,71 @@ function PlayGround() {
return (
<div>
{/* Default state of Email Text Fields */}
<EmailTextField
error={false}
placeholder="olivia@untitledui.com"
id="outlined-basic"
helperText="This is a hint text to help user."
/>
{/* Email Text Field when validation error occures */}
<EmailTextField
error={true}
placeholder="olivia@untitledui.com"
id="outlined-basic"
icon={<ErrorOutlineIcon style={{ fill: "red" }} />}
helperText="This is an error message"
/>
{/* Email Text Field while mouse hover */}
<EmailTextField
error={false}
placeholder="olivia@untitledui.com"
id="outlined-basic"
icon={<HelpOutlineIcon />}
helperText="This is a hint text to help user."
/>
<div
style={{
display: "flex",
flexDirection: "column",
gap: "10px",
maxWidth: "400px",
padding: "10px",
}}
>
<Field
type="email"
id="outlined-basic"
label="Email"
placeholder="olivia@untitledui.com"
/>
{/* Email Text Field when validation error occures */}
<Field
type="email"
id="outlined-basic"
label="Email"
placeholder="olivia@untitledui.com"
error="This is an error message"
/>
</div>
<hr />
{/* Now, illustration of the Website text fields */}
<WebsiteTextField hintText="This is a hint text to help user." />
<WebsiteTextField
hasCopyButton={true}
hintText="This is a hint text to help user."
/>
{/* Now, illustration of the Website text fields */}
<div
style={{
display: "flex",
flexDirection: "column",
gap: "10px",
maxWidth: "400px",
padding: "10px",
}}
>
<Field type="url" label="Website" />
<Field type="url" label="Website" hasCopy={true} />
</div>
<hr />
{/* Now, illustration of the Description text fields */}
<DescriptionTextField
hasError={false}
hintText="This is a hint text to help user."
/>
<DescriptionTextField
hasError={true}
hintText="This is a hint text to help user."
/>
<div
style={{
display: "flex",
flexDirection: "column",
gap: "10px",
maxWidth: "400px",
padding: "10px",
}}
>
<Field
type="description"
label="Description"
placeholder="Enter a description... "
/>
<Field
type="description"
label="Description"
placeholder="Enter a description... "
error="This is an error message"
/>
</div>
<hr />
<PlayGroundCharts />
<hr />