Skip to content

Commit 3b3fc8b

Browse files
Update guidance.js
Signed-off-by: Aryan Shah <149894557+ARYANSHAH1567@users.noreply.github.com>
1 parent e6b8041 commit 3b3fc8b

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

  • src/sections/Projects/Sistent/components/text-input

src/sections/Projects/Sistent/components/text-input/guidance.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState } from "react";
22
import { navigate } from "gatsby";
33
import { useLocation } from "@reach/router";
44
import { SistentLayout } from "../../sistent-layout";
5-
import { SistentThemeProvider, Button, Input } from "@sistent/sistent";
5+
import { SistentThemeProvider, Input } from "@sistent/sistent";
66
import { Row } from "../../../../../reusecore/Layout";
77
import TabButton from "../../../../../reusecore/Button";
88
import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode";
@@ -112,12 +112,11 @@ const TextInputGuidance = () => {
112112
</Row>
113113
<div style={{ marginTop: "15px", display: "flex", gap: "10px", flexWrap: "wrap", justifyContent: "center" }}>
114114
{colors.map((color) => (
115-
<Button
115+
<TabButton
116116
key={color}
117-
variant={currentColor === color ? "contained" : "outlined"}
118-
label={color.charAt(0).toUpperCase() + color.slice(1)}
119-
size="small"
117+
className={currentColor === color ? "active" : ""}
120118
onClick={() => setCurrentColor(color)}
119+
title={color.charAt(0).toUpperCase() + color.slice(1)}
121120
/>
122121
))}
123122
</div>
@@ -141,12 +140,11 @@ const TextInputGuidance = () => {
141140
</Row>
142141
<div style={{ marginTop: "15px", display: "flex", gap: "10px", flexWrap: "wrap", justifyContent: "center" }}>
143142
{types.map((type) => (
144-
<Button
143+
<TabButton
145144
key={type}
146-
variant={currentType === type ? "contained" : "outlined"}
147-
label={type.charAt(0).toUpperCase() + type.slice(1)}
148-
size="small"
145+
className={currentType === type ? "active" : ""}
149146
onClick={() => setCurrentType(type)}
147+
title={type.charAt(0).toUpperCase() + type.slice(1)}
150148
/>
151149
))}
152150
</div>
@@ -159,7 +157,6 @@ const TextInputGuidance = () => {
159157
Input components support various states to provide feedback and control user interaction.
160158
These examples demonstrate different state combinations:
161159
</p>
162-
163160
<div style={{ display: "flex", flexDirection: "column", gap: "20px", alignItems: "center" }}>
164161
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
165162
<div style={{ display: "flex", flexDirection: "column", gap: "16px", alignItems: "center", width: "100%" }}>
@@ -196,7 +193,6 @@ const TextInputGuidance = () => {
196193
<a id="Best Practices">
197194
<h2>Best Practices</h2>
198195
</a>
199-
200196
<h3>Accessibility</h3>
201197
<p>
202198
Always provide clear labels for screen readers and ensure sufficient color contrast.
@@ -220,4 +216,4 @@ const TextInputGuidance = () => {
220216
);
221217
};
222218

223-
export default TextInputGuidance;
219+
export default TextInputGuidance;

0 commit comments

Comments
 (0)