pixelize-design-library 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/App.tsx +0 -10
- package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.stories.tsx +0 -39
- package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.tsx +0 -80
- package/src/Components/Apexcharts/ApexBarChart/ApexBarChartProps.tsx +0 -20
- package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.stories.tsx +0 -33
- package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.tsx +0 -43
- package/src/Components/Apexcharts/ApexPieChart/ApexPieChartProps.tsx +0 -17
- package/src/Components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -26
- package/src/Components/Breadcrumbs/Breadcrumbs.tsx +0 -26
- package/src/Components/Breadcrumbs/BreadcrumbsProps.tsx +0 -12
- package/src/Components/Button/Button.stories.tsx +0 -32
- package/src/Components/Button/Button.tsx +0 -26
- package/src/Components/Button/ButtonProps.tsx +0 -10
- package/src/Components/ButtonGroupIcon/ButtonGoupIconProps.tsx +0 -14
- package/src/Components/ButtonGroupIcon/ButtonGroupIcon.stories.tsx +0 -37
- package/src/Components/ButtonGroupIcon/ButtonGroupIcon.tsx +0 -26
- package/src/Components/Checkbox/Checkbox.stories.tsx +0 -45
- package/src/Components/Checkbox/Checkbox.tsx +0 -29
- package/src/Components/Checkbox/CheckboxProps.tsx +0 -9
- package/src/Components/Input/TextInput.stories.tsx +0 -45
- package/src/Components/Input/TextInput.tsx +0 -70
- package/src/Components/Input/TextInputProps.tsx +0 -27
- package/src/Components/InputTextArea/InputTextArea.stories.tsx +0 -49
- package/src/Components/InputTextArea/InputTextArea.tsx +0 -36
- package/src/Components/InputTextArea/InputTextAreaProps.tsx +0 -11
- package/src/Components/Loading/Loading.stories.tsx +0 -25
- package/src/Components/Loading/Loading.tsx +0 -38
- package/src/Components/Loading/LoadingProps.tsx +0 -1
- package/src/Components/Modal/Modal.stories.tsx +0 -106
- package/src/Components/Modal/Modal.tsx +0 -45
- package/src/Components/Modal/ModalProps.tsx +0 -12
- package/src/Components/NavigationBar/NavBar.stories.tsx +0 -26
- package/src/Components/NavigationBar/NavigationBar.tsx +0 -56
- package/src/Components/NavigationBar/NavigationBarProps.tsx +0 -13
- package/src/Components/NumberInput/NumberInput.stories.tsx +0 -31
- package/src/Components/NumberInput/NumberInput.tsx +0 -56
- package/src/Components/NumberInput/NumberInputProps.tsx +0 -28
- package/src/Components/PinInput/PinInput.stories.tsx +0 -40
- package/src/Components/PinInput/PinInput.tsx +0 -49
- package/src/Components/PinInput/PinInputProps.tsx +0 -33
- package/src/Components/ProfileCard/ProfileCard.stories.tsx +0 -30
- package/src/Components/ProfileCard/ProfileCard.tsx +0 -59
- package/src/Components/ProfileCard/ProfileCardProps.tsx +0 -41
- package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.tsx +0 -25
- package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.tsx +0 -69
- package/src/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.tsx +0 -14
- package/src/Components/ProgressBar/ProgressBar.stories.tsx +0 -46
- package/src/Components/ProgressBar/ProgressBar.tsx +0 -33
- package/src/Components/ProgressBar/ProgressBarProps.tsx +0 -7
- package/src/Components/RadioButton/RadioButton.stories.tsx +0 -46
- package/src/Components/RadioButton/RadioButton.tsx +0 -63
- package/src/Components/RadioButton/RadioButtonProps.tsx +0 -10
- package/src/Components/Select/Select.stories.tsx +0 -57
- package/src/Components/Select/Select.tsx +0 -46
- package/src/Components/Select/SelectProps.tsx +0 -15
- package/src/Components/SideBar/SideBar.tsx +0 -143
- package/src/Components/SideBar/SideBarProps.tsx +0 -18
- package/src/Components/SideBar/Sidebar.stories.tsx +0 -80
- package/src/Components/Skeletons/Skeleton.stories.tsx +0 -63
- package/src/Components/Skeletons/SkeletonProps.tsx +0 -23
- package/src/Components/Skeletons/Skeletons.tsx +0 -52
- package/src/Components/Table/Table.stories.tsx +0 -47
- package/src/Components/Table/Table.tsx +0 -517
- package/src/Components/Table/TableProps.tsx +0 -36
- package/src/Components/Toaster/Toaster.stories.tsx +0 -58
- package/src/Components/Toaster/Toaster.tsx +0 -34
- package/src/Components/Toaster/ToasterProps.tsx +0 -15
- package/src/Components/ToolTip/ToolTip.stories.tsx +0 -39
- package/src/Components/ToolTip/ToolTip.tsx +0 -62
- package/src/Components/ToolTip/ToolTipProps.tsx +0 -45
- package/src/Layout.tsx +0 -499
- package/src/Theme/Dark/theme.ts +0 -278
- package/src/Theme/Default/theme.ts +0 -301
- package/src/Theme/index.ts +0 -4
- package/src/bootstrap.tsx +0 -13
- package/src/index.ts +0 -29
- package/src/index.tsx +0 -22
- package/src/types/pixelize-design-library.d.ts +0 -4
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SelectProps } from "@chakra-ui/react";
|
|
2
|
-
|
|
3
|
-
export type chakraSelectProps = Pick<SelectProps, "placeholder" | "size" | "variant" | "icon" | "bg" | "borderColor" | "color" | "onChange" | "onBlur" | "onFocus" | "errorBorderColor" | "isDisabled" | "isReadOnly" | "isRequired" | "value"> & {
|
|
4
|
-
label?: string;
|
|
5
|
-
error?: boolean;
|
|
6
|
-
errorMessage?: string;
|
|
7
|
-
helperText?: string;
|
|
8
|
-
options: OptionProp[];
|
|
9
|
-
width?: string | number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type OptionProp = {
|
|
13
|
-
id: string | number,
|
|
14
|
-
label: string | number
|
|
15
|
-
}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Flex,
|
|
4
|
-
Text,
|
|
5
|
-
IconButton,
|
|
6
|
-
Menu,
|
|
7
|
-
Link,
|
|
8
|
-
MenuButton,
|
|
9
|
-
Icon,
|
|
10
|
-
MenuList,
|
|
11
|
-
Image,
|
|
12
|
-
MenuItem,
|
|
13
|
-
ChakraProvider
|
|
14
|
-
} from '@chakra-ui/react'
|
|
15
|
-
import {
|
|
16
|
-
FiChevronLeft,
|
|
17
|
-
FiChevronRight,
|
|
18
|
-
} from 'react-icons/fi'
|
|
19
|
-
import { SidebarProps } from './SideBarProps'
|
|
20
|
-
export default function Sidebar({
|
|
21
|
-
menus,
|
|
22
|
-
activeMenu,
|
|
23
|
-
handleMenuClick,
|
|
24
|
-
toggle,
|
|
25
|
-
changeToggle,
|
|
26
|
-
logo,
|
|
27
|
-
companyName
|
|
28
|
-
}: SidebarProps) {
|
|
29
|
-
return (
|
|
30
|
-
<ChakraProvider>
|
|
31
|
-
<Flex
|
|
32
|
-
pos="sticky"
|
|
33
|
-
h="100vh"
|
|
34
|
-
boxShadow="0 4px 12px 0 rgba(0, 0, 0, 0.05)"
|
|
35
|
-
w={toggle ? "75px" : "200px"}
|
|
36
|
-
flexDir="column"
|
|
37
|
-
justifyContent="space-between"
|
|
38
|
-
background={"#ffffff"}
|
|
39
|
-
>
|
|
40
|
-
<Flex
|
|
41
|
-
pl={toggle ? "22%" : "8%"}
|
|
42
|
-
flexDir="column"
|
|
43
|
-
w="100%"
|
|
44
|
-
alignItems={"flex-start"}
|
|
45
|
-
as="nav"
|
|
46
|
-
h="100vh"
|
|
47
|
-
>
|
|
48
|
-
<Flex
|
|
49
|
-
mt={5}
|
|
50
|
-
align="center"
|
|
51
|
-
>
|
|
52
|
-
<Image
|
|
53
|
-
borderRadius='full'
|
|
54
|
-
boxSize={'45px'}
|
|
55
|
-
src={logo}
|
|
56
|
-
alt='Company Logo'
|
|
57
|
-
/>
|
|
58
|
-
<Text ml={4} display={toggle ? "none" : "flex"}>{companyName}</Text>
|
|
59
|
-
</Flex>
|
|
60
|
-
<Flex position={"absolute"} left={toggle ? "55px" : "180px"} top={"60px"} background={"#3182CE"} borderRadius={"23px"}>
|
|
61
|
-
<IconButton
|
|
62
|
-
background={"none"}
|
|
63
|
-
icon={toggle ? <FiChevronRight color={"#ffffff"} /> : <FiChevronLeft color={"#ffffff"} />}
|
|
64
|
-
_hover={{ background: "none" }}
|
|
65
|
-
onClick={changeToggle}
|
|
66
|
-
aria-label='Toggle Navigation'
|
|
67
|
-
/>
|
|
68
|
-
</Flex>
|
|
69
|
-
<Flex
|
|
70
|
-
mt={30}
|
|
71
|
-
flexDir="column"
|
|
72
|
-
w="100%"
|
|
73
|
-
alignItems={toggle ? "center" : "flex-start"}
|
|
74
|
-
h="100vh"
|
|
75
|
-
overflow="scroll"
|
|
76
|
-
css={{
|
|
77
|
-
|
|
78
|
-
'&::-webkit-scrollbar': {
|
|
79
|
-
width: '3px',
|
|
80
|
-
},
|
|
81
|
-
'&::-webkit-scrollbar-track': {
|
|
82
|
-
background: 'transparent',
|
|
83
|
-
},
|
|
84
|
-
'&::-webkit-scrollbar-thumb': {
|
|
85
|
-
background: 'transparent',
|
|
86
|
-
transition: 'background 0.5s',
|
|
87
|
-
},
|
|
88
|
-
'&:hover::-webkit-scrollbar-thumb': {
|
|
89
|
-
background: '#888',
|
|
90
|
-
},
|
|
91
|
-
}}
|
|
92
|
-
ml={toggle ? "-8px":"0px"}
|
|
93
|
-
>
|
|
94
|
-
{menus.map((menu: any) => (
|
|
95
|
-
<Menu key={menu.title} placement="right">
|
|
96
|
-
<Link
|
|
97
|
-
backgroundColor={activeMenu === menu.title ? "#3182CE" : "none"}
|
|
98
|
-
borderRadius={8}
|
|
99
|
-
_hover={{ textDecor: 'none', backgroundColor: "#3182CE", color: "#ffffff" }}
|
|
100
|
-
_active={{ color: "#ffffff" }}
|
|
101
|
-
w={"98%"}
|
|
102
|
-
onClick={() => handleMenuClick(menu?.title, menu?.url)}
|
|
103
|
-
mt={"5px"}
|
|
104
|
-
className='custom-link'
|
|
105
|
-
width={toggle ? "80%" : "90%"}
|
|
106
|
-
>
|
|
107
|
-
<MenuButton w="100%" p={"13px 12px 13px 13px"}>
|
|
108
|
-
<Flex>
|
|
109
|
-
<Icon as={menu.icon} fontSize="xl" color={activeMenu === menu.title ? "#ffff" : ""} />
|
|
110
|
-
<Text ml={5} display={toggle ? "none" : "flex"} color={activeMenu === menu.title ? "#ffff" : ""}>{menu.title}</Text>
|
|
111
|
-
</Flex>
|
|
112
|
-
</MenuButton>
|
|
113
|
-
</Link>
|
|
114
|
-
{
|
|
115
|
-
menu.subMenu &&
|
|
116
|
-
<MenuList py={0}
|
|
117
|
-
border="none"
|
|
118
|
-
ml={toggle ? 3 : 6}
|
|
119
|
-
boxShadow="0 4px 12px 0 rgba(0, 0, 0, 0.05)"
|
|
120
|
-
>
|
|
121
|
-
<Flex
|
|
122
|
-
pos="absolute"
|
|
123
|
-
mt="calc(100px - 70px)"
|
|
124
|
-
ml={"-10px"}
|
|
125
|
-
width={0}
|
|
126
|
-
height={0}
|
|
127
|
-
borderTop="10px solid transparent"
|
|
128
|
-
borderBottom="10px solid transparent"
|
|
129
|
-
borderRight="10px solid #3182CE"
|
|
130
|
-
/>
|
|
131
|
-
{menu.subMenu.map((subMenuItem: any) => (
|
|
132
|
-
<MenuItem key={subMenuItem.title}>{subMenuItem.title}</MenuItem>
|
|
133
|
-
))}
|
|
134
|
-
</MenuList>
|
|
135
|
-
}
|
|
136
|
-
</Menu>
|
|
137
|
-
))}
|
|
138
|
-
</Flex>
|
|
139
|
-
</Flex>
|
|
140
|
-
</Flex >
|
|
141
|
-
</ChakraProvider >
|
|
142
|
-
)
|
|
143
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IconType } from "react-icons";
|
|
2
|
-
|
|
3
|
-
export type SidebarProps = {
|
|
4
|
-
menus: Menu[];
|
|
5
|
-
activeMenu: string;
|
|
6
|
-
handleMenuClick: (title: string, url: string) => void;
|
|
7
|
-
toggle: boolean;
|
|
8
|
-
changeToggle: () => void;
|
|
9
|
-
logo: string;
|
|
10
|
-
companyName: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
type Menu = {
|
|
14
|
-
title: string;
|
|
15
|
-
icon: IconType;
|
|
16
|
-
url: string;
|
|
17
|
-
subMenu?: { title: string; url: string }[];
|
|
18
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { StoryFn, Meta } from '@storybook/react/types-6-0';
|
|
3
|
-
import Sidebar from './SideBar';
|
|
4
|
-
import { SidebarProps } from './SideBarProps';
|
|
5
|
-
import { FiBriefcase, FiCalendar, FiDollarSign, FiHome, FiSettings, FiUser } from 'react-icons/fi';
|
|
6
|
-
import { fn } from '@storybook/test';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Components/Sidebar/Sidebar',
|
|
10
|
-
component: Sidebar,
|
|
11
|
-
} as Meta;
|
|
12
|
-
|
|
13
|
-
const Template: StoryFn<SidebarProps> = (args) => {
|
|
14
|
-
|
|
15
|
-
const [toggle, changeToggle] = useState(true)
|
|
16
|
-
const [activeMenu, setActiveMenu] = useState("")
|
|
17
|
-
|
|
18
|
-
const handleMenuClick = (title: string, url: string) => {
|
|
19
|
-
setActiveMenu(title)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return (<Sidebar {...args} activeMenu={activeMenu} handleMenuClick={handleMenuClick} toggle={toggle} changeToggle={() => changeToggle(!toggle)} />)
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const menus = [
|
|
26
|
-
{
|
|
27
|
-
title: "Dashboard",
|
|
28
|
-
icon: FiHome,
|
|
29
|
-
url: "dashboard"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
title: "Calendar",
|
|
33
|
-
icon: FiCalendar,
|
|
34
|
-
url: "description"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
title: "Clients",
|
|
38
|
-
icon: FiUser,
|
|
39
|
-
url: "description"
|
|
40
|
-
}, {
|
|
41
|
-
title: "Animals",
|
|
42
|
-
icon: FiCalendar,
|
|
43
|
-
url: "description"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
title: "Stock's",
|
|
47
|
-
icon: FiDollarSign,
|
|
48
|
-
url: "description"
|
|
49
|
-
}, {
|
|
50
|
-
title: "Reports",
|
|
51
|
-
icon: FiBriefcase,
|
|
52
|
-
url: "description"
|
|
53
|
-
}, {
|
|
54
|
-
title: "Settings",
|
|
55
|
-
icon: FiSettings,
|
|
56
|
-
url: "description",
|
|
57
|
-
subMenu: [
|
|
58
|
-
{
|
|
59
|
-
title: "Submenu Item 1",
|
|
60
|
-
url: "Submenu item 1 description"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
title: "Submenu Item 2",
|
|
64
|
-
url: "Submenu item 2 description"
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
|
|
70
|
-
export const Primary = Template.bind({});
|
|
71
|
-
|
|
72
|
-
Primary.args = {
|
|
73
|
-
menus: menus,
|
|
74
|
-
activeMenu: '',
|
|
75
|
-
handleMenuClick: fn(),
|
|
76
|
-
toggle: false,
|
|
77
|
-
changeToggle: fn(),
|
|
78
|
-
logo: 'https://bit.ly/dan-abramov',
|
|
79
|
-
companyName: 'PIXELIZE'
|
|
80
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Meta, StoryFn } from '@storybook/react';
|
|
3
|
-
import Skeletons from './Skeletons'; // adjust the import path as necessary
|
|
4
|
-
import { ChakraProvider } from '@chakra-ui/react';
|
|
5
|
-
import { SkeletonProps } from './SkeletonProps'; // adjust the import path as necessary
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Components/Skeletons/Skeletons',
|
|
9
|
-
component: Skeletons,
|
|
10
|
-
argTypes: {
|
|
11
|
-
startColor: { control: 'color' },
|
|
12
|
-
endColor: { control: 'color' },
|
|
13
|
-
height: { control: 'text' },
|
|
14
|
-
isLoaded: { control: 'boolean' },
|
|
15
|
-
bg: { control: 'color' },
|
|
16
|
-
color: { control: 'color' },
|
|
17
|
-
fadeDuration: { control: 'number' },
|
|
18
|
-
children: { control: 'text' },
|
|
19
|
-
type: { control: { type: 'select', options: ['skeleton', 'circle', 'text'] } },
|
|
20
|
-
speed: { control: 'number' },
|
|
21
|
-
size: { control: 'text' },
|
|
22
|
-
mt: { control: 'text' },
|
|
23
|
-
noOfLines: { control: 'number' },
|
|
24
|
-
spacing: { control: 'text' },
|
|
25
|
-
skeletonHeight: { control: 'text' },
|
|
26
|
-
},
|
|
27
|
-
} as Meta;
|
|
28
|
-
|
|
29
|
-
const Template: StoryFn<SkeletonProps> = (args) => (
|
|
30
|
-
<ChakraProvider>
|
|
31
|
-
<Skeletons {...args} />
|
|
32
|
-
</ChakraProvider>
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
export const DefaultSkeleton = Template.bind({});
|
|
36
|
-
DefaultSkeleton.args = {
|
|
37
|
-
type: 'skeleton',
|
|
38
|
-
isLoaded: false,
|
|
39
|
-
height: '20px',
|
|
40
|
-
startColor: 'gray.200',
|
|
41
|
-
endColor: 'gray.400',
|
|
42
|
-
speed: 1.2,
|
|
43
|
-
fadeDuration: 0.4,
|
|
44
|
-
children: 'Loading...',
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const SkeletonCircle = Template.bind({});
|
|
48
|
-
SkeletonCircle.args = {
|
|
49
|
-
type: 'circle',
|
|
50
|
-
isLoaded: false,
|
|
51
|
-
size: '40px',
|
|
52
|
-
speed: 1.2,
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const SkeletonText = Template.bind({});
|
|
56
|
-
SkeletonText.args = {
|
|
57
|
-
type: 'text',
|
|
58
|
-
isLoaded: false,
|
|
59
|
-
mt: '4',
|
|
60
|
-
noOfLines: 4,
|
|
61
|
-
spacing: '4',
|
|
62
|
-
skeletonHeight: '20px',
|
|
63
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SkeletonProps as ChakraSkeleton,
|
|
3
|
-
SkeletonTextProps,
|
|
4
|
-
} from "@chakra-ui/react";
|
|
5
|
-
|
|
6
|
-
export type SkeletonProps = Pick<
|
|
7
|
-
ChakraSkeleton,
|
|
8
|
-
| "startColor"
|
|
9
|
-
| "endColor"
|
|
10
|
-
| "height"
|
|
11
|
-
| "isLoaded"
|
|
12
|
-
| "bg"
|
|
13
|
-
| "color"
|
|
14
|
-
| "fadeDuration"
|
|
15
|
-
| "children"
|
|
16
|
-
| "speed"
|
|
17
|
-
| "size"
|
|
18
|
-
| "mt"
|
|
19
|
-
| "noOfLines"
|
|
20
|
-
| "width"
|
|
21
|
-
> & {
|
|
22
|
-
type: "skeleton" | "circle" | "text";
|
|
23
|
-
} & Partial<Pick<SkeletonTextProps, "spacing" | "skeletonHeight">>;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChakraProvider } from "@chakra-ui/react";
|
|
3
|
-
import { Skeleton, SkeletonCircle, SkeletonText } from "@chakra-ui/react";
|
|
4
|
-
import { SkeletonProps } from "./SkeletonProps";
|
|
5
|
-
|
|
6
|
-
export default function Skeletons({
|
|
7
|
-
startColor,
|
|
8
|
-
endColor,
|
|
9
|
-
height = "20px",
|
|
10
|
-
isLoaded,
|
|
11
|
-
bg,
|
|
12
|
-
color,
|
|
13
|
-
fadeDuration,
|
|
14
|
-
children,
|
|
15
|
-
type,
|
|
16
|
-
speed,
|
|
17
|
-
size,
|
|
18
|
-
mt,
|
|
19
|
-
noOfLines,
|
|
20
|
-
spacing,
|
|
21
|
-
skeletonHeight,
|
|
22
|
-
width
|
|
23
|
-
}: SkeletonProps) {
|
|
24
|
-
return (
|
|
25
|
-
<ChakraProvider>
|
|
26
|
-
{type === "skeleton" && (
|
|
27
|
-
<Skeleton
|
|
28
|
-
height={height}
|
|
29
|
-
isLoaded={isLoaded}
|
|
30
|
-
bg={bg}
|
|
31
|
-
color={color}
|
|
32
|
-
fadeDuration={fadeDuration}
|
|
33
|
-
startColor={startColor}
|
|
34
|
-
endColor={endColor}
|
|
35
|
-
speed={speed}
|
|
36
|
-
width={width}
|
|
37
|
-
>
|
|
38
|
-
{children}
|
|
39
|
-
</Skeleton>
|
|
40
|
-
)}
|
|
41
|
-
{type === "circle" && <SkeletonCircle size={size} speed={speed} />}
|
|
42
|
-
{type === "text" && (
|
|
43
|
-
<SkeletonText
|
|
44
|
-
mt={mt}
|
|
45
|
-
noOfLines={noOfLines}
|
|
46
|
-
spacing={spacing}
|
|
47
|
-
skeletonHeight={skeletonHeight}
|
|
48
|
-
/>
|
|
49
|
-
)}
|
|
50
|
-
</ChakraProvider>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// Import React and the Table component
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import Table from './Table';
|
|
4
|
-
import { TableProps } from './TableProps';
|
|
5
|
-
// Import Storybook's required modules
|
|
6
|
-
import { StoryFn, Meta } from '@storybook/react';
|
|
7
|
-
import { fn } from '@storybook/test';
|
|
8
|
-
|
|
9
|
-
// Define default export with component metadata
|
|
10
|
-
export default {
|
|
11
|
-
title: 'Components/Table/Table',
|
|
12
|
-
component: Table,
|
|
13
|
-
} as Meta;
|
|
14
|
-
|
|
15
|
-
const Template: StoryFn<TableProps> = (args) => <Table {...args} />;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export const Default = Template.bind({});
|
|
19
|
-
Default.args = {
|
|
20
|
-
headers: [
|
|
21
|
-
{ label: 'name', accessor_key: "name", sort: false, search: false, columnFreeze: true },
|
|
22
|
-
{ label: 'email', accessor_key: "email", sort: true, search: true, columnFreeze: true },
|
|
23
|
-
{ label: 'role', accessor_key: "role", sort: true, search: true },
|
|
24
|
-
{ label: 'age', accessor_key: "age", sort: true, search: true },
|
|
25
|
-
{ label: 'age1', accessor_key: "age1", sort: true, search: true },
|
|
26
|
-
{ label: 'age2', accessor_key: "age2", sort: true, search: true },
|
|
27
|
-
{ label: 'age3', accessor_key: "age3", sort: true, search: true },
|
|
28
|
-
{ label: 'age4', accessor_key: "age4", sort: true, search: true },
|
|
29
|
-
{ label: 'age5', accessor_key: "age5", sort: true, search: true },
|
|
30
|
-
{ label: 'age6', accessor_key: "age6", sort: true, search: true },
|
|
31
|
-
{ label: 'age7', accessor_key: "age7", sort: true, search: true },
|
|
32
|
-
],
|
|
33
|
-
data: [{
|
|
34
|
-
id: 1,
|
|
35
|
-
name: `User 1`,
|
|
36
|
-
email: `user1@example.com`,
|
|
37
|
-
role: 'Developer',
|
|
38
|
-
age: 20,
|
|
39
|
-
age1: 34,
|
|
40
|
-
age2: 56,
|
|
41
|
-
age3: 66,
|
|
42
|
-
age4: 68,
|
|
43
|
-
age5: 70,
|
|
44
|
-
age6: 35,
|
|
45
|
-
age7: 24,
|
|
46
|
-
}],
|
|
47
|
-
};
|