@@ -2,10 +2,10 @@ import React from "react";
2
2
import { navigate } from "gatsby" ;
3
3
import { useLocation } from "@reach/router" ;
4
4
5
- import { SistentThemeProvider , Button } from "@layer5/sistent" ;
5
+ import { SistentThemeProvider } from "@layer5/sistent" ;
6
6
import TabButton from "../../../../../reusecore/Button" ;
7
7
import { SistentLayout } from "../../sistent-layout" ;
8
- import { Col , Row } from "../../../../../reusecore/Layout" ;
8
+ import { Row } from "../../../../../reusecore/Layout" ;
9
9
import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode" ;
10
10
import {
11
11
Container ,
@@ -196,25 +196,19 @@ const SistentSelect = () => {
196
196
< h2 > Sizes</ h2 >
197
197
</ a >
198
198
< p >
199
- For buttons to be fully effective, they can be adjusted in size to
200
- accommodate multiple use cases where they may apply. These size
201
- changes are usually done to the height of the buttons and not the
202
- width since buttons usually grow to contain their content. The
203
- height that makes up the different sizes of our buttons are gotten
204
- from our spacing system to retain space consistency. We have chosen
205
- two different sizes of buttons to provide options and more sizes can
206
- be added to fill the growing needs.
207
- </ p >
208
- < h3 > 56px / 3.5rem</ h3 >
209
- < p >
210
- The 56px button is the first button size. It is currently the
211
- largest button available for use and it is available for both mobile
212
- and desktop resolutions, but it serves in different capacities
213
- across these different resolutions.
199
+ The select component can be adjusted in size to accommodate various
200
+ use cases. These size adjustments typically affect the height of the
201
+ component, while the width adjusts to fit the content. The height of
202
+ the select component is derived from our spacing system to maintain
203
+ consistency. We offer multiple sizes to meet different needs.
214
204
</ p >
205
+ < h3 > Auto width</ h3 >
206
+ { /* <p>
207
+ The width of the component can scale
208
+ </p> */ }
215
209
< Row $Hcenter className = "image-container" >
216
210
< SistentThemeProvider initialMode = { isDark ? "dark" : "light" } >
217
- < FormControl fullWidth >
211
+ < FormControl sx = { { minWidth : "120px" , m : 1 } } >
218
212
< InputLabel id = "demo-select-label" > Age</ InputLabel >
219
213
< Select
220
214
labelId = "demo-select-label-standard"
@@ -229,32 +223,54 @@ const SistentSelect = () => {
229
223
</ FormControl >
230
224
</ SistentThemeProvider >
231
225
</ Row >
232
- < h3 > 48px / 3rem </ h3 >
233
- < p >
226
+ < h3 > Small </ h3 >
227
+ { /* <p>
234
228
The 48px button is the second button size currently in use and it is
235
229
available from mobile to desktop resolutions, even though it serves
236
230
in different capacities across these screen sizes.
237
- </ p >
231
+ </p> */ }
238
232
< Row $Hcenter className = "image-container" >
239
233
< SistentThemeProvider initialMode = { isDark ? "dark" : "light" } >
240
- < Button variant = "contained" label = "48px / 3rem" size = "medium" />
234
+ < FormControl sx = { { minWidth : "80px" , m : 1 } } size = "small" >
235
+ < InputLabel id = "demo-select-label" > Age</ InputLabel >
236
+ < Select
237
+ labelId = "demo-select-label-standard"
238
+ id = "demo-select-standard"
239
+ label = "Age"
240
+ variant = "standard"
241
+ >
242
+ < MenuItem value = { 10 } > Ten</ MenuItem >
243
+ < MenuItem value = { 20 } > Twenty</ MenuItem >
244
+ < MenuItem value = { 30 } > Thirty</ MenuItem >
245
+ </ Select >
246
+ </ FormControl >
241
247
</ SistentThemeProvider >
242
248
</ Row >
243
249
< h3 > Full width</ h3 >
244
- < p >
250
+ { /* <p>
245
251
Full width buttons are more efficient in mobile designs and rightly
246
252
so in order to offer users with a wider touch area since the input
247
253
devices - the fingers, are a lot larger than the cursor on a desktop
248
254
or larger screen.
249
- </ p >
255
+ </p> */ }
250
256
< Row $Hcenter className = "image-container" >
251
- < Col sm = { 12 } >
252
- < SistentThemeProvider initialMode = { isDark ? "dark" : "light" } >
253
- < Button variant = "contained" label = "Full width" fullWidth />
254
- </ SistentThemeProvider >
255
- </ Col >
257
+ < SistentThemeProvider initialMode = { isDark ? "dark" : "light" } >
258
+ < FormControl fullWidth sx = { { m : 1 } } >
259
+ < InputLabel id = "demo-select-label" > Age</ InputLabel >
260
+ < Select
261
+ labelId = "demo-select-label-standard"
262
+ id = "demo-select-standard"
263
+ label = "Age"
264
+ variant = "standard"
265
+ >
266
+ < MenuItem value = { 10 } > Ten</ MenuItem >
267
+ < MenuItem value = { 20 } > Twenty</ MenuItem >
268
+ < MenuItem value = { 30 } > Thirty</ MenuItem >
269
+ </ Select >
270
+ </ FormControl >
271
+ </ SistentThemeProvider >
256
272
</ Row >
257
- < p >
273
+ { /* <p>
258
274
<strong>NOTE:</strong>
259
275
</p>
260
276
<p>
@@ -265,20 +281,28 @@ const SistentSelect = () => {
265
281
48px is the default size. Preferred button sizes (height) are
266
282
usually arrived at through exploration and proper consideration of
267
283
industry standards and best practices.
268
- </ p >
269
- < a id = "Adding Icons " >
270
- < h2 > Adding Icons </ h2 >
284
+ </p> */ }
285
+ < a id = "Multiple select " >
286
+ < h2 > Multiple select </ h2 >
271
287
</ a >
272
- < p >
273
- Sometimes, icons are used alongside labels in buttons to pass across
274
- specific information or relay added information for a higher level
275
- of understanding and better comprehension. Depending on the
276
- information being conveyed, the icons can be placed on the left side
277
- of the label text or on the right side of the label text. No
278
- specific rules apply apart from spacing tips which may be considered
279
- here. For full width buttons, if icons must be added, they should be
280
- centered in the button alongside the label text.
281
- </ p >
288
+ < Row $Hcenter className = "image-container" >
289
+ < SistentThemeProvider initialMode = { isDark ? "dark" : "light" } >
290
+ < FormControl fullWidth sx = { { m : 1 } } >
291
+ < InputLabel id = "demo-select-label" > Age</ InputLabel >
292
+ < Select
293
+ labelId = "demo-select-label-standard"
294
+ id = "demo-select-standard"
295
+ label = "Age"
296
+ variant = "standard"
297
+ multiple
298
+ >
299
+ < MenuItem value = { 10 } > Ten</ MenuItem >
300
+ < MenuItem value = { 20 } > Twenty</ MenuItem >
301
+ < MenuItem value = { 30 } > Thirty</ MenuItem >
302
+ </ Select >
303
+ </ FormControl >
304
+ </ SistentThemeProvider >
305
+ </ Row >
282
306
</ div >
283
307
</ div >
284
308
</ SistentLayout >
0 commit comments