File size: 26,057 Bytes
ceaf79c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd04d64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ceaf79c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
#--

React Story Book Content for the same can be found below with its respective decriptions : 

Description:

The following is the example for Input, which can be for either Textfields or TextArea, these will be used for taking input of different types : 

TextField  is : 

  <Input
    data-testid="input-test-id"
    helperText="It must contain a minimum of 8 characters and include at least 1 small case letter, 1 capital letter, and 1 special character."
    label="Label"
    placeholder="Placeholder"
    type="text"
  />


TextArea is : 


  <Input
    data-testid="input-test-id"
    label="Label"
    type="textarea"
  />

These are replacements for natural <input> box normaly used in react, but are defined for nitrozen., 

The arguments for the above are as follows with thier descriptions  : 
In the below ignore the word control, type is used to tell teh type of argument, action tell when it happens and options tell different set of input that can be provieded to it, 


1. autoComplete: This field controls whether browsers should automatically complete the input value based on the user's input history.
2. type: This is the type of input field the box will render as, e.g., email, password, number, etc.
3. label: This is the label text that appears above or beside the input box.
4. placeholder: This is the placeholder text that appears within the input box when it is empty.
5. disabled: This field controls whether the input field is disabled or not.
6. required: This field controls whether the input field is required to be filled out.
7. value: This is the current value of the input box.
8. showSearchIcon: This field controls whether a search icon will appear within the input box.
9. id: This is the unique identifier of the input box.
10. showPrefix: This field controls whether a prefix element is displayed on the input box.
11. showSuffix: This field controls whether a suffix element is displayed on the input box.
12. autofocus: This field controls whether the input box is automatically focused when the component is loaded.
13. min: This field sets the minimum value for number and date inputs.
14. max: This field sets the maximum value for number and date inputs.
15. stateText: This field sets additional state information that appears under the input box, e.g., validation errors.
16. maxLength: This field sets the maximum number of characters allowed in the input box.
17. tooltipText: This field sets the text that appears in a tooltip when the input box is hovered over.
18. showTooltip: This field controls whether the tooltip is displayed or not.
19. onKeyUp/onKeyPress/onChange/onBlur/onFocus/onClick/onPrefixClick/onSuffixClick: These fields define what happens when these events occur.
20. state: This field sets the state of the input box, e.g., default, error, success, warning.
21. suffix: This field defines an element to be placed on the right side of the input box, ideally an icon. This element is clickable.
22. prefix: This field defines an element to be placed on the left side of the input box, ideally an icon. This element is clickable.


Different Types that it allows are as follow : 

The "options" field in this JSON represents the different values that can be selected for the input type of the React component. Here's the meaning of each option value and some sample use cases:

* "email": This option value is used when the input should only accept valid email addresses. Sample use case: A sign-up form where the user needs to provide their email address.
* "month": This option value is used when the input should only accept a month in the format YYYY-MM. Sample use case: A form where the user needs to select their birth month.
* "number": This option value is used when the input should only accept numeric values. Sample use case: A form where the user needs to enter their age.
* "password": This option value is used when the input should obscure the entered text (e.g. with asterisks) for security reasons. Sample use case: A login form where the user needs to enter their password.
* "tel": This option value is used when the input should only accept valid telephone numbers. Sample use case: A form where the user needs to provide their phone number.
* "text": This option value is used when the input should accept any text. Sample use case: A form where the user needs to provide their name.
* "textarea": This option value is used when the input should accept multiple lines of text. Sample use case: A feedback form where the user needs to provide detailed comments.
* "week": This option value is used when the input should only accept a week in the format YYYY-W## (where ## is the week number). Sample use case: A form where the user needs to select the week of a year for a project.
* "date": This option value is used when the input should only accept a date in the format YYYY-MM-DD. Sample use case: A form where the user needs to enter their birthdate.
* "datetime-local": This option value is used when the input should only accept a date and time in the format YYYY-MM-DDTHH:MM. Sample use case: A form where the user needs to schedule an appointment.
* "month": This option value is used when the input should only accept a month in the format YYYY-MM. Sample use case: A form where the user needs to select the month for a subscription renewal.

#--

Description:

The following is the example for Table, which can be used to display  data in tabular format 

* it can be used instead of <table> html when working on a nitrozen compliant product. 

Sample Table Code :

Where tableHeader is array of headers and tableRow is array of rows that needs to be displayes
In the following name in tableHeader should match with key in the tableRows 


  <Table
    onRowClick={() => {}}
    rowStyle="simple"
    showColumnDivider
    tableHeader={[
      {
        customSort: function noRefCheck() {},
        name: 'firstName',
        sortable: true,
        value: 'First name',
        width: '50%'
      },
      {
        name: 'lastName',
        sortable: false,
        value: 'Last name',
        width: '20%'
      },
      {
        customSort: function noRefCheck() {},
        name: 'age',
        sortable: true,
        type: 'number',
        value: 'Age',
        width: '100px'
      }
    ]}
    tableRow={[
      {
        age: 45,
        firstName: 'John',
        lastName: 'Yang'
      },
      
    ]}
  />

The arguments are as follows :-  


1. The tableRow field is an array of objects, each object representing a row in the table. Each row has an age, firstName, and lastName field.
2. The tableHeader field is an array of objects representing the table header. Each header object has a name, value, and width field, and optionally a customSort and sortable field.
3. The footer field is a text string for the table footer.
4. The rowStyle field is a dropdown with two options - "simple" and "zebra" - for styling the rows.
5. The onRowClick field is a function that is called when a row is clicked, with the row index as an argument.
6. The headerBackground field is a color picker for setting the background color of the table header.
7. The customSortIcon field is an element - ideally an icon - to be placed on the left side of the header, which can be clickable if onIconClick is defined.
8. The checkable field is a boolean value, indicating whether or not the rows can be selected.
9. The showColumnDivider field is a boolean value, indicating whether or not to show dividers between columns.


We can also make these tables checkable by doing the following :- 


      <Table
        {...args}
        checkable={true}
        getCheckedItems={getCheckedItems}
        allCheckClicked={allCheckClicked}
        tableRow={rowItem}
        onRowClick={onRowClick}
      />


Here is the sample code for implementing select all 



  // Function to select all items in the table
  const handleSelectAll = (isChecked) => {
    if (isChecked) {
      const newSelectedItems = [...tableData];
      setSelectedItems(newSelectedItems);
    } else {
      setSelectedItems([]);
    }
  };


It also has the feature to implement sorting this can be done as follows :- 


1. Define a sort icon using customSortIcon
2. In table header select the column by setting the customSort function which does the sorting for you. 
3. Sample of sortFunction is as follows : 

  const sortNames = () => {
    let tempItemsArr = [...rowItem];
    tempItemsArr = tempItemsArr.sort((a, b) =>
      a.firstName.localeCompare(b.firstName)
    );
    setRowItem(tempItemsArr);
  };

  <Table
    customSortIcon={<SvgIcSort color="white" />}
    rowStyle="simple"
    showColumnDivider
    tableHeader={[
      {
        customSort: function noRefCheck() {},
        name: 'firstName',
        sortable: true,
        value: 'First name',
        width: '50%'
      },
      {
        name: 'lastName',
        sortable: false,
        value: 'Last name',
        width: '20%'
      },
      {
        name: 'age',
        type: 'number',
        value: 'Age',
        width: '100px'
      }
    ]}
    tableRow={[
      {
        age: 45,
        firstName: 'John',
        lastName: 'Yang'
      },
      {
        age: 16,
        firstName: 'Robert',
        lastName: 'Peterson'
      },
      {
        age: 45,
        firstName: 'Dana',
        lastName: 'Culley'
      },
     
    ]}
  />

#--

Pagination

Description : 

The following is the example for the component which can be used to paginate on something, 

* Ideal Implementation for this would be to do pagination of Table component mentioned in Nitozen 

Sample Code : 


    <Pagination
      id="1"
      name="Pages"
      onChange={() => {}}
      onNextClick={function noRefCheck() {}}
      onPreviousClick={function noRefCheck() {}}
      pageSizeOptions={[
        10,
        20,
        50,
        100
      ]}
      value={{
        current: '[Circular]',
        currentPage: '',
        currentTotal: 100,
        limit: 10,
        nextPage: '',
        prevPage: '',
        total: 100
      }}
    />

There are two types of pagination : 


1. Basic : which works on page based pagination 
2. Secondary : which work on offset based pagination 


Arguments for each are as follows :- 

Basic  : 

id: A unique identifier for the pagination component. It can be used for styling or for referencing the component in the code.
name: A label for the pagination component. It indicates what the pagination is for and can be used for accessibility purposes.
value: An object containing information about the pagination, including:

    * limit: The maximum number of items to display per page.
    * total: The total number of items available for pagination.
    * current: The current page number.
    * prevPage: The URL of the previous page, if applicable.
    * nextPage: The URL of the next page, if applicable.
    * currentPage: The URL of the current page, if applicable.
    * currentTotal: The total number of items on the current page.

pageSizeOptions: An array of options for the number of items to display per page. It can be used to allow the user to select the number of items to display.
onChange: A callback function that is called when the user changes the pagination. It can be used to update the page number or other pagination information.
onPreviousClick: A callback function that is called when the user clicks the "Previous" button. It can be used to navigate to the previous page.
onNextClick: A callback function that is called when the user clicks the "Next" button. It can be used to navigate to the next page.

For cursor-based pagination, there is an additional property:

* mode: A value indicating that the pagination is using cursor-based pagination.

In cursor-based pagination, the value property contains additional properties related to the cursor:

* prevPage: A cursor that can be used to retrieve the previous page of data.
* nextPage: A cursor that can be used to retrieve the next page of data.
* currentPage: The current cursor used to retrieve the current page of data.
* currentTotal: The total number of items in the current cursor.


Here is a  samples : 

Secondary : 


    <Pagination
      id="1"
      mode="cursor"
      name="Pages"
      onChange={() => {}}
      onNextClick={function noRefCheck() {}}
      onPreviousClick={function noRefCheck() {}}
      pageSizeOptions={[
        10,
        20
      ]}
      value={{
        current: '[Circular]',
        currentPage: '',
        currentTotal: 100,
        limit: 10,
        nextPage: '',
        prevPage: '',
        total: 100
      }}
    />

Note you can optimise this code as well :- 


import React, { useState, useEffect } from "react";
import { Table, Autocomplete, Pagination } from "@gofynd/nitrozen-react";
import "./paginationTable.css";
function PaginatedTable({ columns, getData, converRow }) {
    if (!converRow) {
        converRow = (row) => {
            return row;
        };
    }
    const [tableData, setTableData] = useState([]);
    const [pageOptions, setPageOptions] = useState({
        "limit": 10,
        "total": 20,
        "current": 1,
        "prevPage": "",
        "nextPage": "",
        "currentPage": "",
        "currentTotal": 20,
    });

    const fetchData = async (e) => {
        var query = "";
        if (e && e.current && e.limit) {
            query = query + "page=" + e.current + "&limit=" + e.limit;
        }
        const response = await fetchFunction(query);
        const flattenData = response.data.items.map(converRow);
        pageOptions.total = response.data.page.item_total;
        pageOptions.currentTotal = response.data.page.size;
        setPageOptions(pageOptions);
        setTableData(flattenData);
        console.log("Setting current total to: ", response.data.page.item_total);
    };

    useEffect(() => {
        fetchData();
    }, [pageOptions]);

    return (
        <div>
            <Table
                className="table"
                checkable
                showColumnDivider={false}
                onRowClick={() => {}}
                rowStyle="simple"
                tableHeader={columns}
                tableRow={tableData}
            />
            <Pagination
                id="1"
                name="Pages"
                pageSizeOptions={[10, 20, 50, 100]}
                value={pageOptions}
                onChange={(e) => {
                    fetchData(e);
                }}
            />
        </div>
    );
}

export default PaginatedTable;

#--
Checkbox

Description:

The following is the example for checkbox, which can be used to allow selection of one or more options from a list of choices.  

* it can be used instead of <checkbox> html when working on a nitrozen compliant product. 

Sample checkbox Code :



  <Checkbox
    checkArray={[
      'Vue1'
    ]}
    checkboxValue="React"
    icon={() => {}}
    id="React1"
    labelText="React"
    name="basic1"
    onChange={function noRefCheck() {}}
    onIconClick={function noRefCheck() {}}
    showIcon
    state="success"
    stateMessage="Success"
    value="React1"
  />
  <Checkbox
    checkArray={[
      'Vue1'
    ]}
    checkboxValue="Angular1"
    icon={function noRefCheck() {}}
    id="Angular1"
    labelText="Angular"
    name="basic"
    onChange={function noRefCheck() {}}
    onIconClick={function noRefCheck() {}}
    showIcon
    state="warning"
    stateMessage="Warning"
    value="Angular1"
  />
  <Checkbox
    checkArray={[
      'Vue1'
    ]}
    checkboxValue="Vue1"
    disabled
    icon={function noRefCheck() {}}
    id="Vue1"
    labelText="Vue"
    onChange={function noRefCheck() {}}
    onIconClick={function noRefCheck() {}}
    showIcon
    state="error"
    stateMessage="Error"
    value="Vue1"
  />

The arguments are as follows :-  


1. disabled: A boolean field that specifies whether the checkbox is disabled or not. If set to true, the checkbox will be grayed out and the user will not be able to interact with it.
2. value: A text field that represents the value of the checkbox. This can be any string or text that you want to associate with the checkbox.
3. name: A text field that specifies the name of the checkbox. This can be used to group the checkbox with other elements in a form.
4. state: A select field that represents the validation state of the checkbox. The options are "success", "warning", and "error". This can be used to provide visual feedback to the user regarding the state of the checkbox.
5. stateMessage: A text field that provides a message to the user regarding the state of the checkbox. This can be used to provide additional context or information to the user.
6. checkboxValue: A boolean field that specifies the value of the checkbox. If set to true, the checkbox will be checked.
7. id: A text field that specifies the id of the checkbox. This can be used to associate the checkbox with other elements in a form.
8. onChange: An action field that specifies the function to be called when the checkbox is clicked or changed.
9. onIconClick: A function field that specifies the function to be called when the icon on the left of the checkbox is clicked.
10. style: An object field that specifies the CSS style of the checkbox.
11. labelStyle: An object field that specifies the CSS style of the label associated with the checkbox.
12. className: A text field that specifies the class name of the checkbox.
13. labelText: A text field that specifies the text of the label associated with the checkbox.
14. showIcon: A boolean field that specifies whether to show the icon on the left of the checkbox.
15. icon: An array of SVG elements that can be used as an icon on the left of the checkbox.
16. isIndeterminate: A boolean field that specifies whether the checkbox is in an indeterminate state. This is often used when dealing with tri-state checkboxes that can be checked, unchecked, or in an indeterminate state.

#--
Radiobutton

Description: 
The following is the example for radiobutton which is a UI element that allows users to select one option from a list of mutually exclusive choices.

Sample radiobutton code: 


<Radio
    icon={() => {}}
    id="girl"
    labelText="Girl"
    name="basic"
    onChange={function noRefCheck() {}}
    onIconClick={function noRefCheck() {}}
    radioValue="girl"
    showIcon
    value="girl"
  />
  <Radio
    icon={function noRefCheck() {}}
    id="boy"
    labelText="Boy"
    name="basic"
    onChange={function noRefCheck() {}}
    onIconClick={function noRefCheck() {}}
    radioValue="girl"
    showIcon
    value="boy"
  />
  <Radio
    id="other"
    labelText="Other"
    name="basic"
    onChange={function noRefCheck() {}}
    radioValue="girl"
    value="other"
  />

The arguments are as follows :-  


1. disabled: A boolean field that specifies whether the radio button is disabled or not. If set to true, the radio button will be grayed out and the user will not be able to interact with it.
2. name: A text field that specifies the name of the radio button. This can be used to group the radio button with other elements in a form.
3. labelText: A text field that specifies the text of the label associated with the radio button.
4. value: A text field that represents the value of the radio button. This can be any string or text that you want to associate with the radio button.
5. radioValue: A text field that represents the value of the selected radio button in a group. This is used to differentiate between the selected radio buttons when multiple radio buttons are grouped together.
6. id: A text field that specifies the id of the radio button. This can be used to associate the radio button with other elements in a form.
7. onChange: An action field that specifies the function to be called when the radio button is clicked or changed.
8. state: A select field that represents the validation state of the radio button. The options are "success", "warning", and "error". This can be used to provide visual feedback to the user regarding the state of the radio button.
9. stateMessage: A text field that provides a message to the user regarding the state of the radio button. This can be used to provide additional context or information to the user.
10. onIconClick: A function field that specifies the function to be called when the icon on the left of the radio button is clicked.
11. showIcon: A boolean field that specifies whether to show the icon on the left of the radio button.
12. icon: An array of SVG elements that can be used as an icon on the left of the radio button.

#--

Button

Description: 
The following is the example for button which is a graphical user interface element that can be clicked or tapped to perform an action or trigger a process.

Sample button code: 


<Button onClick={() => {}}>
    Button
  </Button>

There are multiple variations of buttons as mentioned below along with sample code:


All Themes 

The size of the button can be defined as small, medium and large. This can be done by setting the themes as primary, secondary and tertiary. Below is the code snippet:


 <div className="sb-display-grid">
      <Button theme="primary" size="small">
        Button
      </Button>
      <Button theme="primary" size="medium">
        Button
      </Button>
      <Button theme="primary" size="large">
        Button
      </Button>
    </div>
    <div className="sb-display-grid">
      <Button theme="secondary" size="small">
        Button
      </Button>
      <Button theme="secondary" size="medium">
        Button
      </Button>
      <Button theme="secondary" size="large">
        Button
      </Button>
    </div>
    <div className="sb-display-grid">
      <Button theme="tertiary" size="small">
        Button
      </Button>
      <Button theme="tertiary" size="medium">
        Button
      </Button>
      <Button theme="tertiary" size="large">
        Button
      </Button>
    </div>



Button With Icon Left

A button with an icon on the left is a graphical user interface element that displays an icon on the left side of the button, typically used to visually represent the action or process triggered by the button. Below is the code snippet:


    <div className="sb-display-grid">
      <Button theme="primary" size="small" icon={SvgArray.SvgIcAlarmOff}>
        Button
      </Button>
      <Button theme="primary" size="medium" icon={SvgArray.SvgIcAlarmOff}>
        Button
      </Button>
      <Button theme="primary" size="large" icon={SvgArray.SvgIcAlarmOff}>
        Button
      </Button>
    </div>
    <div className="sb-display-grid">
      <Button theme="secondary" size="small" icon={SvgArray.SvgIcAlarmOff}>
        Button
      </Button>
      <Button theme="secondary" size="medium" icon={SvgArray.SvgIcAlarmOff}>
        Button
      </Button>
      <Button theme="secondary" size="large" icon={SvgArray.SvgIcAlarmOff}>
        Button
      </Button>
    </div>
    <div className="sb-display-grid">
      <Button theme="tertiary" size="small" icon={SvgArray.SvgIcAlarmOff}>
        Button
      </Button>
      <Button theme="tertiary" size="medium" icon={SvgArray.SvgIcAlarmOff}>
        Button
      </Button>
      <Button theme="tertiary" size="large" icon={SvgArray.SvgIcAlarmOff}>
        Button
      </Button>
    </div>

All Themes With Positive State

A button with a positive state is a graphical user interface element that displays a button in a style that indicates a positive or successful state, typically used to confirm or complete an action. Below is the code snippet:


<div className="sb-display-grid">
      <Button theme="primary" size="small" state="positive">
        Button
      </Button>
      <Button theme="primary" size="medium" state="positive">
        Button
      </Button>
      <Button theme="primary" size="large" state="positive">
        Button
      </Button>
    </div>
    <div className="sb-display-grid">
      <Button theme="secondary" size="small" state="positive">
        Button
      </Button>
      <Button theme="secondary" size="medium" state="positive">
        Button
      </Button>
      <Button theme="secondary" size="large" state="positive">
        Button
      </Button>
    </div>
    <div className="sb-display-grid">
      <Button theme="tertiary" size="small" state="positive">
        Button
      </Button>
      <Button theme="tertiary" size="medium" state="positive">
        Button
      </Button>
      <Button theme="tertiary" size="large" state="positive">
        Button
      </Button>
    </div>

The arguments for button are as follows: 


1. children: This property sets the display value or label of the button.
2. theme: This property sets the visual theme of the button. It has three options: primary, secondary, and tertiary.
3. as: This property determines whether the root element should be a <button>, <div>, or <span>.
4. size: This property sets the size of the button. It has three options: small, medium, and large.
5. rounded: This property sets the border radius of the button. If true, the button has rounded corners.
6. href: This property converts the button into an anchor tag with the specified URL, which is useful for redirection.
7. disabled: This property enables or disables the button. If true, the button is disabled and cannot be clicked.
8. focused: This property sets focus on the button. If true, the button is focused.
9. state: This property changes the button to a custom state. It has three options: positive, destructive, and default.
10. showProgress: This property adds a loader to the button, indicating that it is processing a request or action.
11. fullWidth: This property determines whether the button should take up the full width of its container.
12. id: This property sets a unique identifier for the button.
13. name: This property sets a name for the button.
14. icon: This property displays an icon on the left side of the button.
15. iconRight: This property displays an icon on the right side of the button.