Skip to content

Commit

Permalink
added the basic components
Browse files Browse the repository at this point in the history
Signed-off-by: Narasimha <[email protected]>
  • Loading branch information
narasimha-1511 committed Jul 27, 2024
1 parent f950676 commit 19a2385
Showing 1 changed file with 67 additions and 1 deletion.
68 changes: 67 additions & 1 deletion src/sections/Projects/Sistent/components/text-input/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,25 @@ import { useLocation } from "@reach/router";
import { SistentLayout } from "../../sistent-layout";

import TabButton from "../../../../../reusecore/Button";
import { Input, SistentThemeProvider } from "@layer5/sistent";
import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode";
import { CodeBlock } from "../button/code-block";

const codes = [
` <SistentThemeProvider>
<Input placeholder="PlaceHolder" />
</SistentThemeProvider>`,
`This is for the search
`,
` This is for the password
`,
` <SistentThemeProvider>
<Input placeholder="PlaceHolder" multiline />
</SistentThemeProvider>`
];

export const TextInputCode = () => {
const { isDark } = useStyledDarkMode();
const location = useLocation();

return (
Expand Down Expand Up @@ -56,7 +73,56 @@ export const TextInputCode = () => {
title="Code"
/>
</div>
<div className="main-content">Sorry, this page is still under work</div>
<div className="main-content">
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
<p>
Text inputs allow users to enter information in the form of text in order to complete a task or flow or to receive
expected information.
</p>
<a id="Basic Input">
<h2>Basic Input</h2>
</a>
<p>The Input comes in several types: Defualt, Search, Password and Multiline.</p>
<h3>Defualt Input</h3>
<p>
Defualt Text inputs are widely used across interfaces, from filling forms to entering text content.
Icons are rarely needed but can be included if necessary.
</p>
<div className="showcase">
<div className="items">
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
<Input placeholder="Placeholder" />
</SistentThemeProvider>
</div>
<CodeBlock name="default-input" code={codes[0]} />
</div>
{/* <h3>Search</h3>
<p>
Search text input is used to input search text for a page or a given group
of displayed information to select one or a few from the provided list.
It makes use of two icons that appear across different states.
</p> */}
{/* <h3>Password</h3>
<p>
This text input functions for fields that require passwords only. With a corresponding
icon to show or hide the any inputted text, this text input functions to receive only
password inputs.
</p> */}
<h3>Multiline Input</h3>
<p>
Multiline text input functions for input that requires more than one line of text.
This text input adjusts vertically based on the amount of lines of text entered into the text field.
</p>
<div className="showcase">
<div className="items">
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
<Input placeholder="Placeholder goes here and adjusts the lines" multiline />
</SistentThemeProvider>
</div>
<CodeBlock name="multi-line-input" code={codes[3]} />
</div>
</SistentThemeProvider>
</div>
</div>
</SistentLayout>
);
Expand Down

0 comments on commit 19a2385

Please sign in to comment.