Skip to content

Commit dd5e51d

Browse files
New: Sistent Card Component + lint fixes
Signed-off-by: Anand-Theertha <[email protected]>
1 parent cabd5ce commit dd5e51d

File tree

3 files changed

+31
-67
lines changed

3 files changed

+31
-67
lines changed

src/sections/Projects/Sistent/components/card/code.js

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const CardCode = () => {
133133
Meshery
134134
</Typography>
135135
<Typography variant="body2" sx={{ color: "text.secondary" }}>
136-
Meshery is an open-source cloud-native management platform designed to help users manage, monitor, and optimize the performance of service meshes and their workloads.
136+
Meshery is an open-source cloud-native management platform designed to help users manage, monitor, and optimize the performance of service meshes and their workloads.
137137
</Typography>
138138
</CardContent>
139139
</CardActions>
@@ -172,9 +172,7 @@ export const CardCode = () => {
172172
<a id="Identity">
173173
<h2>Card</h2>
174174
</a>
175-
<p>The Card component is a UI element used to encapsulate information or actions related to a single topic,
176-
typically in a visually separated, easily digestible format. It often includes elements like images, text,
177-
and buttons to present content and enable quick interactions without navigating away from the card.</p>
175+
<p>The Card component is a UI element used to encapsulate information or actions related to a single topic, typically in a visually separated, easily digestible format. It often includes elements like images, text, and buttons to present content and enable quick interactions without navigating away from the card.</p>
178176
<div className="filterBtns">
179177
<TabButton
180178
className={
@@ -212,15 +210,13 @@ export const CardCode = () => {
212210
</div>
213211
<div className="main-content">
214212
<p>
215-
A card often lets users interact with its entire surface to trigger its main function, whether it’s expanding,
216-
navigating to another screen, or activating some other behavior.
213+
A card often lets users interact with its entire surface to trigger its main function, whether it’s expanding, navigating to another screen, or activating some other behavior.
217214
</p>
218215
<a id="Outlined Card">
219216
<h2>Oultined Card Example</h2>
220217
</a>
221218
<p>
222-
An outlined card is a variation of the standard card component, often used to provide a lighter, more minimalist design.
223-
Instead of a solid background or shadow, an outlined card uses a border to define its boundaries, giving it a cleaner and more refined appearance.
219+
An outlined card is a variation of the standard card component, often used to provide a lighter, more minimalist design. Instead of a solid background or shadow, an outlined card uses a border to define its boundaries, giving it a cleaner and more refined appearance.
224220
</p>
225221
<div className="showcase">
226222
<div className="items">
@@ -236,21 +232,19 @@ export const CardCode = () => {
236232
<h2>Main Action Cards</h2>
237233
</a>
238234
<p>
239-
This type of interactive card is well-suited for use in applications where quick access to more information or actions is important, such as dashboards, or product catalogs.
240-
For example, ont the website, users can tap anywhere on the card to open the full product page.
235+
This type of interactive card is well-suited for use in applications where quick access to more information or actions is important, such as dashboards, or product catalogs. For example, ont the website, users can tap anywhere on the card to open the full product page.
241236
</p>
242237
<div className="showcase">
243238
<div className="items">
244-
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
245-
<Card variant="outlined">{cardMainAction1}</Card>
246-
</SistentThemeProvider>
239+
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
240+
<Card variant="outlined">{cardMainAction1}</Card>
241+
</SistentThemeProvider>
247242
</div>
248243
<CodeBlock name="Container-fluid-md" code={codes[1]} />
249244
</div>
250245
</div>
251246
<p>
252-
Cards can also include secondary actions, which should be positioned away
253-
from the primary action area to avoid unintentional interaction conflicts.
247+
Cards can also include secondary actions, which should be positioned away from the primary action area to avoid unintentional interaction conflicts.
254248
</p>
255249
<div className="showcase">
256250
<div className="items">

src/sections/Projects/Sistent/components/card/guidance.js

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const CardGuidance = () => {
4848
Meshery
4949
</Typography>
5050
<Typography variant="body2" sx={{ color: "text.secondary" }}>
51-
Meshery is an open-source cloud-native management platform designed to help users manage, monitor, and optimize the performance of service meshes and their workloads.
51+
Meshery is an open-source cloud-native management platform designed to help users manage, monitor, and optimize the performance of service meshes and their workloads.
5252
</Typography>
5353
</CardContent>
5454
</CardActions>
@@ -140,10 +140,7 @@ export const CardGuidance = () => {
140140

141141
<h3>Oultined Card</h3>
142142
<p>
143-
Outlined cards are ideal for use in layouts that benefit from a subtle, modern look, such as in settings with light backgrounds where visual clarity is important.
144-
They’re perfect for showcasing items like product listings, profiles, or dashboard summaries, as the minimal border keeps the focus on the content without adding
145-
visual weight.
146-
</p>
143+
Outlined cards are ideal for use in layouts that benefit from a subtle, modern look, such as in settings with light backgrounds where visual clarity is important. They’re perfect for showcasing items like product listings, profiles, or dashboard summaries, as the minimal border keeps the focus on the content without adding visual weight.</p>
147144
<Row $Hcenter className="image-container">
148145
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
149146
<Card variant="outlined">{cardOutlined}</Card>
@@ -152,9 +149,7 @@ export const CardGuidance = () => {
152149

153150
<h3>Main Action Cards</h3>
154151
<p>
155-
This type of interactive card is well-suited for use in applications where quick access to more information
156-
or actions is important, such as dashboards, or product catalogs.
157-
For example, ont the website, users can tap anywhere on the card to open the full product page.
152+
This type of interactive card is well-suited for use in applications where quick access to more information or actions is important, such as dashboards, or product catalogs. For example, ont the website, users can tap anywhere on the card to open the full product page.
158153
</p>
159154
<Row $Hcenter className="image-container">
160155
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
@@ -163,9 +158,7 @@ export const CardGuidance = () => {
163158
</Row>
164159

165160
<p>
166-
In usage, cards can incorporate secondary actions, like sharing, bookmarking, or viewing additional details,
167-
which are typically placed separately from the main action area. This separation prevents accidental taps or clicks,
168-
allowing users to clearly distinguish between the primary function of the card (like opening a detailed view) and other supporting actions.
161+
In usage, cards can incorporate secondary actions, like sharing, bookmarking, or viewing additional details, which are typically placed separately from the main action area. This separation prevents accidental taps or clicks, allowing users to clearly distinguish between the primary function of the card (like opening a detailed view) and other supporting actions.
169162
</p>
170163
<Row $Hcenter className="image-container">
171164
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
@@ -177,32 +170,22 @@ export const CardGuidance = () => {
177170
<h2>Labeling</h2>
178171
</a>
179172
<p>
180-
For card components, clear labeling helps define the purpose and hierarchy of each card,
181-
making it easier for users to understand the content at a glance.
182-
Labels, like titles or category tags, can indicate the main topic or action associated with each card,
183-
improving navigation and usability within a grid of multiple cards.
173+
For card components, clear labeling helps define the purpose and hierarchy of each card, making it easier for users to understand the content at a glance. Labels, like titles or category tags, can indicate the main topic or action associated with each card, improving navigation and usability within a grid of multiple cards.
184174
</p>
185175

186176
<h3>Hierarchy and Visual Cues</h3>
187177
<p>
188-
Cards benefit from a clear hierarchy, using typography, spacing, and color to guide users through the content.
189-
For instance, a card title in bold or larger text immediately draws attention, while secondary information is displayed
190-
with subdued colors.
178+
Cards benefit from a clear hierarchy, using typography, spacing, and color to guide users through the content. For instance, a card title in bold or larger text immediately draws attention, while secondary information is displayed with subdued colors.
191179
</p>
192180

193181
<h3>Interactivity and Feedback</h3>
194182
<p>
195-
Cards often use hover effects, shadow adjustments, or subtle animations to indicate interactivity.
196-
This feedback helps users identify clickable areas or interactive elements within the card, providing
197-
a more engaging experience.
183+
Cards often use hover effects, shadow adjustments, or subtle animations to indicate interactivity. This feedback helps users identify clickable areas or interactive elements within the card, providing a more engaging experience.
198184
</p>
199185

200186
<h3>Consistency in Style and Layout</h3>
201187
<p>
202-
Cards should maintain a consistent style throughout an interface to ensure a unified look and feel.
203-
Consistency in aspects like font sizes, padding, border radii, and color schemes helps cards blend naturally
204-
into the overall UI design, improving readability and making interactions feel intuitive across
205-
different screens or sections.
188+
Cards should maintain a consistent style throughout an interface to ensure a unified look and feel. Consistency in aspects like font sizes, padding, border radii, and color schemes helps cards blend naturally into the overall UI design, improving readability and making interactions feel intuitive across different screens or sections.
206189
</p>
207190

208191
</div>

src/sections/Projects/Sistent/components/card/index.js

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from "react";
22
import { navigate } from "gatsby";
33
import { useLocation } from "@reach/router";
4-
import MesheryLogo from "../../../../../assets/images/meshery/meshery-logo-light-text-side.webp"
5-
import KanvasLogo from "../../../../../assets/images/kanvas/icon-only/kanvas-icon-color.png"
4+
import MesheryLogo from "../../../../../assets/images/meshery/meshery-logo-light-text-side.webp";
5+
import KanvasLogo from "../../../../../assets/images/kanvas/icon-only/kanvas-icon-color.png";
66

7-
import { SistentThemeProvider, Card, CardActions, CardContent, CardHeader, CardMedia , Typography, Box, Button} from "@layer5/sistent";
7+
import { SistentThemeProvider, Card, CardActions, CardContent, CardHeader, CardMedia , Typography, Box, Button } from "@layer5/sistent";
88
import TabButton from "../../../../../reusecore/Button";
99
import { SistentLayout } from "../../sistent-layout";
1010
import { Row } from "../../../../../reusecore/Layout";
@@ -57,7 +57,7 @@ const SistentCard = () => {
5757
Meshery
5858
</Typography>
5959
<Typography variant="body2" sx={{ color: "text.secondary" }}>
60-
Meshery is an open-source cloud-native management platform designed to help users manage, monitor, and optimize the performance of service meshes and their workloads.
60+
Meshery is an open-source cloud-native management platform designed to help users manage, monitor, and optimize the performance of service meshes and their workloads.
6161
</Typography>
6262
</CardContent>
6363
</CardActions>
@@ -69,7 +69,7 @@ const SistentCard = () => {
6969
<CardActions>
7070
<CardMedia
7171
component="img"
72-
height="90"
72+
height="90"
7373
image={KanvasLogo}
7474
alt="Kanvas"
7575
/>
@@ -89,17 +89,14 @@ const SistentCard = () => {
8989
</CardActions>
9090
</Card>
9191
);
92-
93-
9492
return (
9593
<SistentLayout title="Card">
9694
<div className="content">
9795
<a id="Identity">
9896
<h2>Card</h2>
9997
</a>
100-
<p>The Card component is a UI element used to encapsulate information or actions related to a single topic,
101-
typically in a visually separated, easily digestible format. It often includes elements like images, text,
102-
and buttons to present content and enable quick interactions without navigating away from the card.
98+
<p>The Card component is a UI element used to encapsulate information or actions related to a single topic, typically in a visually separated, easily digestible format. It often includes elements like images, text, and buttons to present content and enable quick interactions without navigating away from the card.
99+
103100
</p>
104101
<div className="filterBtns">
105102
<TabButton
@@ -138,11 +135,7 @@ const SistentCard = () => {
138135
</div>
139136
<div className="main-content">
140137
<p>
141-
The card component is a versatile UI element commonly used in web and mobile applications.
142-
It's designed to showcase content in a clean, concise, and visually organized manner.
143-
Typically, a card groups related information, making it easy for users to digest and interact with.
144-
It often includes an image or icon, title, description, and actionable buttons or links, all contained
145-
within a defined boundary that makes it visually distinct.
138+
The card component is a versatile UI element commonly used in web and mobile applications. It's designed to showcase content in a clean, concise, and visually organized manner. Typically, a card groups related information, making it easy for users to digest and interact with. It often includes an image or icon, title, description, and actionable buttons or links, all contained within a defined boundary that makes it visually distinct.
146139
</p>
147140
<a id="Types of Cards">
148141
<h2>Types of Cards</h2>
@@ -151,8 +144,7 @@ const SistentCard = () => {
151144
</p>
152145
<h3>Outlined</h3>
153146
<p>
154-
An outlined card is a variation of the standard card component, often used to provide a lighter, more minimalist design.
155-
Instead of a solid background or shadow, an outlined card uses a border to define its boundaries, giving it a cleaner and more refined appearance.
147+
An outlined card is a variation of the standard card component, often used to provide a lighter, more minimalist design. Instead of a solid background or shadow, an outlined card uses a border to define its boundaries, giving it a cleaner and more refined appearance.
156148
</p>
157149
<Row $Hcenter className="image-container">
158150
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
@@ -161,30 +153,25 @@ const SistentCard = () => {
161153
</Row>
162154

163155
<h3>Main Action</h3>
164-
<p>
165-
1. A card often lets users interact with its entire surface to trigger its main function,
166-
whether it’s expanding, navigating to another screen, or activating some other behavior.
167-
</p>
156+
<p>1. A card often lets users interact with its entire surface to trigger its main function, whether it’s expanding, navigating to another screen, or activating some other behavior.</p>
168157
<Row $Hcenter className="image-container">
169158
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
170159
<Card variant="outlined">{cardMainAction1}</Card>
171160
</SistentThemeProvider>
172161
</Row>
173162

174163
<p>
175-
2. Cards can also include secondary actions, which should be positioned away
176-
from the primary action area to avoid unintentional interaction conflicts.
164+
2. Cards can also include secondary actions, which should be positioned away from the primary action area to avoid unintentional interaction conflicts.
177165
</p>
178166
<Row $Hcenter className="image-container">
179167
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
180168
<Card variant="outlined">{cardMainAction2}</Card>
181169
</SistentThemeProvider>
182170
</Row>
183171

184-
<p> NOTE:
185-
Cards may offer multiple actions, UI elements, and an overflow menu,
186-
but it’s important to exercise restraint, as they are primarily designed to serve
187-
as entry points to deeper and more comprehensive content.</p>
172+
<p>
173+
NOTE: Cards may offer multiple actions, UI elements, and an overflow menu, but it’s important to exercise restraint, as they are primarily designed to serve as entry points to deeper and more comprehensive content.
174+
</p>
188175
</div>
189176
</div>
190177
</SistentLayout>

0 commit comments

Comments
 (0)