|
1 | | -// import React from "react"; |
2 | | -// import { navigate } from "gatsby"; |
3 | | -// import { useLocation } from "@reach/router"; |
4 | | -// import { SistentLayout } from "../../sistent-layout"; |
5 | | -// import TabButton from "../../../../../reusecore/Button"; |
6 | | -// import { Row } from "../../../../../reusecore/Layout"; |
7 | | -// import { Avatar, AvatarGroup, SistentThemeProvider } from "@sistent/sistent"; |
8 | | -// import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; |
9 | | -// |
10 | | -// import user1 from "../../../../../assets/images/sistent/placeholder/user.webp"; |
11 | | -// import user2 from "../../../../../assets/images/sistent/placeholder/user.webp"; |
12 | | -// import user3 from "../../../../../assets/images/sistent/placeholder/user.webp"; |
13 | | -// import user4 from "../../../../../assets/images/sistent/placeholder/user.webp"; |
14 | | -// |
15 | | -// const AvatarGroupGuidance = () => { |
16 | | -// const location = useLocation(); |
17 | | -// const { isDark } = useStyledDarkMode(); |
18 | | -// |
19 | | -// return ( |
20 | | -// <SistentLayout title="Avatar Group"> |
21 | | -// <div className="content"> |
22 | | -// <a id="Identity"> |
23 | | -// <h2>Avatar Group</h2> |
24 | | -// </a> |
25 | | -// <p> |
26 | | -// The AvatarGroup component is used to represent a collection of users |
27 | | -// or entities visually grouped together. It is ideal for team-based |
28 | | -// representations, collaborative interfaces, or participant listings in |
29 | | -// a compact form. |
30 | | -// </p> |
31 | | -// |
32 | | -// {/* Tab Navigation */} |
33 | | -// <div className="filterBtns"> |
34 | | -// <TabButton |
35 | | -// className={ |
36 | | -// location.pathname === "/projects/sistent/components/avatar-group" |
37 | | -// ? "active" |
38 | | -// : "" |
39 | | -// } |
40 | | -// onClick={() => |
41 | | -// navigate("/projects/sistent/components/avatar-group") |
42 | | -// } |
43 | | -// title="Overview" |
44 | | -// /> |
45 | | -// <TabButton |
46 | | -// className={ |
47 | | -// location.pathname === |
48 | | -// "/projects/sistent/components/avatar-group/guidance" |
49 | | -// ? "active" |
50 | | -// : "" |
51 | | -// } |
52 | | -// onClick={() => |
53 | | -// navigate("/projects/sistent/components/avatar-group/guidance") |
54 | | -// } |
55 | | -// title="Guidance" |
56 | | -// /> |
57 | | -// <TabButton |
58 | | -// className={ |
59 | | -// location.pathname === |
60 | | -// "/projects/sistent/components/avatar-group/code" |
61 | | -// ? "active" |
62 | | -// : "" |
63 | | -// } |
64 | | -// onClick={() => |
65 | | -// navigate("/projects/sistent/components/avatar-group/code") |
66 | | -// } |
67 | | -// title="Code" |
68 | | -// /> |
69 | | -// </div> |
70 | | -// |
71 | | -// <div className="main-content"> |
72 | | -// <p> |
73 | | -// To use AvatarGroup effectively, consider the number of users, the |
74 | | -// available space, and the visual emphasis. This ensures the grouping |
75 | | -// is clear, non-intrusive, and enhances usability across contexts. |
76 | | -// </p> |
77 | | -// |
78 | | -// <a id="Usage"> |
79 | | -// <h2>Usage Patterns</h2> |
80 | | -// </a> |
81 | | -// |
82 | | -// <h3>Default Behavior</h3> |
83 | | -// <p> |
84 | | -// AvatarGroup automatically arranges avatars in a horizontal layout |
85 | | -// with overlapping positioning for visual compactness. It's perfect |
86 | | -// for showing contributors or team members. |
87 | | -// </p> |
88 | | -// <Row $Hcenter className="image-container"> |
89 | | -// <SistentThemeProvider initialMode={isDark ? "dark" : "light"}> |
90 | | -// <AvatarGroup> |
91 | | -// <Avatar src={user1} alt="User 1" /> |
92 | | -// <Avatar src={user2} alt="User 2" /> |
93 | | -// <Avatar src={user3} alt="User 3" /> |
94 | | -// </AvatarGroup> |
95 | | -// </SistentThemeProvider> |
96 | | -// </Row> |
97 | | -// |
98 | | -// <h3>Limiting Avatars (max)</h3> |
99 | | -// <p> |
100 | | -// Use the <code>max</code> prop to show a maximum number of avatars. |
101 | | -// Any excess is summarized into a counter (e.g., +2) for cleaner |
102 | | -// display. |
103 | | -// </p> |
104 | | -// <Row $Hcenter className="image-container"> |
105 | | -// <SistentThemeProvider initialMode={isDark ? "dark" : "light"}> |
106 | | -// <AvatarGroup max={3}> |
107 | | -// <Avatar src={user1} /> |
108 | | -// <Avatar src={user2} /> |
109 | | -// <Avatar src={user3} /> |
110 | | -// <Avatar src={user4} /> |
111 | | -// </AvatarGroup> |
112 | | -// </SistentThemeProvider> |
113 | | -// </Row> |
114 | | -// |
115 | | -// <h3>Spacing</h3> |
116 | | -// <p> |
117 | | -// AvatarGroup supports adjustable spacing between avatars. Use the{" "} |
118 | | -// <code>spacing</code> prop with values like <code>"small"</code>,{" "} |
119 | | -// <code>"medium"</code>, or custom units to control layout density. |
120 | | -// </p> |
121 | | -// <Row $Hcenter className="image-container"> |
122 | | -// <SistentThemeProvider initialMode={isDark ? "dark" : "light"}> |
123 | | -// <AvatarGroup spacing="medium"> |
124 | | -// <Avatar src={user1} /> |
125 | | -// <Avatar src={user2} /> |
126 | | -// <Avatar src={user3} /> |
127 | | -// </AvatarGroup> |
128 | | -// </SistentThemeProvider> |
129 | | -// </Row> |
130 | | -// |
131 | | -// <h3>Shape Variants</h3> |
132 | | -// <p> |
133 | | -// Each Avatar in the group can have a <code>variant</code> like{" "} |
134 | | -// <code>rounded</code> or <code>square</code>, offering flexibility in |
135 | | -// adapting to different visual styles. |
136 | | -// </p> |
137 | | -// <Row $Hcenter className="image-container"> |
138 | | -// <SistentThemeProvider initialMode={isDark ? "dark" : "light"}> |
139 | | -// <AvatarGroup> |
140 | | -// <Avatar variant="rounded" src={user1} /> |
141 | | -// <Avatar variant="square" src={user2} /> |
142 | | -// <Avatar src={user3} /> |
143 | | -// </AvatarGroup> |
144 | | -// </SistentThemeProvider> |
145 | | -// </Row> |
146 | | -// |
147 | | -// <h3>Accessibility</h3> |
148 | | -// <p> |
149 | | -// Always include <code>alt</code> text for each avatar to improve |
150 | | -// accessibility. Use meaningful labels (e.g., full names or roles) |
151 | | -// where possible. |
152 | | -// </p> |
153 | | -// </div> |
154 | | -// </div> |
155 | | -// </SistentLayout> |
156 | | -// ); |
157 | | -// }; |
158 | | -// |
159 | | -// export default AvatarGroupGuidance; |
160 | | - |
161 | 1 | import React from "react"; |
162 | 2 | import { navigate } from "gatsby"; |
163 | 3 | import { useLocation } from "@reach/router"; |
|
0 commit comments