diff --git a/src/sections/Projects/Project-grid/projectGrid.style.js b/src/sections/Projects/Project-grid/projectGrid.style.js index 4f06b1d9ce1b..767c1d48c9ea 100644 --- a/src/sections/Projects/Project-grid/projectGrid.style.js +++ b/src/sections/Projects/Project-grid/projectGrid.style.js @@ -436,7 +436,7 @@ export const ProjectWrapper = styled.div` .project__card.sistent img { margin-top: 0px; - margin-bottom: 0px; + margin-bottom: 0 px; } .project__card.seven { diff --git a/src/sections/Projects/Sistent/components/button/index.js b/src/sections/Projects/Sistent/components/button/index.js index 2eedbcf98bf4..530b828ab2d7 100644 --- a/src/sections/Projects/Sistent/components/button/index.js +++ b/src/sections/Projects/Sistent/components/button/index.js @@ -18,7 +18,7 @@ const overviewContents = [ const guidanceContents = [ { id: 0, link: "#Function", text: "Function" }, - { id: 1, link: "#Labeling", text: "Labeling" }, + { id: 1, link: "#Labelling", text: "Labelling" }, ]; const codeContents = [ diff --git a/src/sections/Projects/Sistent/components/text-input.js b/src/sections/Projects/Sistent/components/text-input.js deleted file mode 100644 index 10ea6f0dc6b2..000000000000 --- a/src/sections/Projects/Sistent/components/text-input.js +++ /dev/null @@ -1,7 +0,0 @@ -import React from "react"; - -const SistentTextInput = () => { - return
SistentTextInput
; -}; - -export default SistentTextInput; diff --git a/src/sections/Projects/Sistent/components/text-input/code.js b/src/sections/Projects/Sistent/components/text-input/code.js new file mode 100644 index 000000000000..97b37e4afca6 --- /dev/null +++ b/src/sections/Projects/Sistent/components/text-input/code.js @@ -0,0 +1,7 @@ +import React from "react"; + +export const TextInputCode = () => { + return ( +
Sorry, this page is still under work
+ ); +}; diff --git a/src/sections/Projects/Sistent/components/text-input/guidance.js b/src/sections/Projects/Sistent/components/text-input/guidance.js new file mode 100644 index 000000000000..31cccbc65993 --- /dev/null +++ b/src/sections/Projects/Sistent/components/text-input/guidance.js @@ -0,0 +1,70 @@ +import React from "react"; +import { Row } from "../../../../../reusecore/Layout"; +import { SistentThemeProvider, Input } from "@layer5/sistent"; + +export const TextInputGuidance = () => { + return ( +
+

+ Although we have only one type of text input to be used, there are + different roles that they can function in that ensure that these inputs + prove sufficient for multiple use cases. +

+ +

Function

+
+

+

Default

+

+ Default text inputs are used for most of the input needs across an + interface. From filling up forms to entering text content in provided + form fields to complete an action or a task. this text input is mostly + utilized. Icons are not seldom required in this text input, however, + they can included when extremely necessary. +

+ + + + + +

Multiline

+

+ 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. +

+ + + + + + +

Labelling

+
+

+ A couple of elements come together to support the input field depending + on the context in is being used. These elements either provide added + information or provide much needed support to ensure users are able to + complete intended tasks. +

+

Label

+

+ The label is an optional feature that can accompany the text input. It + an be used to point out what is required in the input field. +

+

Required

+

+ This type of label that is usually applied in forms to inform users of a + compulsary information that is to be provided in order to complete the + form. It is represented by an asterisk mark (*) that appears after the + label text. +

+

Helper text

+

+ Helper text appears at the bottom of the input field and it is primarily + to serve as an alert for the user to inform them based on the input they + have entered but only where necessary. +

+
+ ); +}; diff --git a/src/sections/Projects/Sistent/components/text-input/index.js b/src/sections/Projects/Sistent/components/text-input/index.js new file mode 100644 index 000000000000..41016a025f4a --- /dev/null +++ b/src/sections/Projects/Sistent/components/text-input/index.js @@ -0,0 +1,91 @@ +import React, { useState } from "react"; +import SistentWrapper from "../../sistent.style"; +import TOC from "../../../../../components/SistentNavigation"; +import { Container } from "../../../../../reusecore/Layout"; +import SistentPagination from "../../../../../components/SistentNavigation/pagination"; +import TabButton from "../../../../../reusecore/Button"; +import IntraPage from "../../../../../components/handbook-navigation/intra-page"; + +import { TextInputOverview } from "./overview"; +import { TextInputGuidance } from "./guidance"; +import { TextInputCode } from "./code"; + +const overviewContents = [ + { id: 0, link: "#Design", text: "Design" }, + { id: 1, link: "#Sizes", text: "Sizes" }, + { id: 2, link: "#Adding Icons", text: "Adding Icons" }, +]; + +const guidanceContents = [ + { id: 0, link: "#Function", text: "Function" }, + { id: 1, link: "#Labelling", text: "Labelling" }, +]; + +const codeContents = [ + { id: 0, link: "#Basic Button", text: "Basic Button" }, + { id: 1, link: "#Sizes", text: "Sizes" }, + { id: 1, link: "#Adding Icons", text: "Adding Icons" }, +]; + +const SistentTextInput = () => { + const [activeTab, setActiveTab] = useState("overview"); + + const contents = () => { + if (activeTab === "overview") { + return overviewContents; + } else if (activeTab === "guidance") { + return guidanceContents; + } else if (activeTab === "code") { + return codeContents; + } + }; + + return ( + +
+

Button

+
+ +
+ +
+ +

Text Input

+
+

+ Text inputs are important elements that help users interact with + an experience by providing text commands that will in turn return + expected results. These commands can range from providing a free + range of personal information to entering a limited number of + characters for a use case. +

+
+ setActiveTab("overview")} + title="Overview" + /> + setActiveTab("guidance")} + title="Guidance" + /> + setActiveTab("code")} + title="Code" + /> +
+ {activeTab === "overview" && } + {activeTab === "guidance" && } + {activeTab === "code" && } +
+ +
+ +
+
+ ); +}; + +export default SistentTextInput; diff --git a/src/sections/Projects/Sistent/components/text-input/overview.js b/src/sections/Projects/Sistent/components/text-input/overview.js new file mode 100644 index 000000000000..d5ddf3d04c6f --- /dev/null +++ b/src/sections/Projects/Sistent/components/text-input/overview.js @@ -0,0 +1,95 @@ +import React from "react"; + +import { SistentThemeProvider, Input } from "@layer5/sistent"; +import { Row } from "../../../../../reusecore/Layout"; + +export const TextInputOverview = () => { + return ( +
+

+ Text inputs are important elements that help users interact with an + experience by providing text commands that will in turn return expected + results. These commands can range from providing a free range of + personal information to entering a limited number of characters for a + use case. +

+ +

Design

+
+

+ Instead of various types for use across designs, the text input has just + one type to ensure simplicity and efficiency. It is preferable that + inputs are as minimal as possible since the sole function that they + generally perform is to ensure that users are able to send in data and + receive corresponding information. +

+ + + + + + +

Sizes

+
+

+ Since input fields have a responsive width that adjusts depending on the + need and use case, size considerations are mostly directed at the height + of the field. This means that the size of text inputs adjust only + relative to the height of the text field. Because text inputs are mostly + used in tandem with buttons, to ensure design consistency, text inputs + and buttons have similar size requirements. +

+

56px / 3.5rem

+

+ The 56px text input is the first field size. It is the largest text + input available for use and it is available for both mobile and desktop + resolutions, but it serves in different capacities across these + different resolutions. +

+ + + + + +

48px / 3rem

+

+ The 48px text input is the second field size in use and it is available + from mobile to desktop resolutions, even though it serves in different + capacities across these screen sizes. +

+ + + + + +

+ NOTE: +

+

+ These sizes are being specified with numerical values because though the + same size is used across screen resolutions, they have different roles. + On desktop for instance, the 56px text input is a the default size, and + 48px the small size, while on mobile, 56px is large and 48px is the + default size. Preferred text input sizes (height) are usually arrived at + through exploration and proper consideration of industry standards and + best practices. +

+ +

Adding Icons

+
+

+ Icons can be used often in text inputs to aid in understanding the + required parameters for a given field or to provide options that can + help to improve the experience as a user navigates a given set of text + inputs. Depending on the context, icons can be placed on the left and + right at different times or even at the same time. The icons should be + aligned to the left or right side of the input field and not to the + center, while text remains left aligned. +

+
+ ); +};