-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathstepper.ts
55 lines (52 loc) · 1.41 KB
/
stepper.ts
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
import { ComponentInfo } from '../components';
import { BaseComponent } from '../entities';
import { checkmark, indexByOptionId } from '../utils';
const componentId = 'stepper';
export interface Stepper extends BaseComponent {
componentId: typeof componentId;
options: {
canBeVertical: boolean;
clickable: boolean;
stepDescription: boolean;
stepError: boolean;
stepIcon: boolean;
};
}
export const stepper: ComponentInfo = {
cannonicalName: 'Stepper',
componentId,
description: 'Navigation that guides users through the steps of a task.',
indefiniteArticle: 'a',
optionsById: indexByOptionId([
{
criteria: 'The steps can be stacked vertically.',
name: 'Can Be Vertical',
optionId: 'canBeVertical',
...checkmark,
},
{
criteria: 'A user can click on the step itself to navigate.',
name: 'Clickable',
optionId: 'clickable',
...checkmark,
},
{
criteria: 'A step can have a subtext with a description.',
name: 'Step Description',
optionId: 'stepDescription',
...checkmark,
},
{
criteria: 'A step with an error can be easily identified to the user.',
name: 'Step Error',
optionId: 'stepError',
...checkmark,
},
{
criteria: 'The steps have a prop whereby they can be given custom icons.',
name: 'Step Icon',
optionId: 'stepIcon',
...checkmark,
},
]),
};