pixel-react 1.0.7 → 1.0.9

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.
Files changed (68) hide show
  1. package/lib/components/AddButton/AddButton.d.ts +5 -0
  2. package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
  3. package/lib/components/AddButton/index.d.ts +1 -0
  4. package/lib/components/AddButton/types.d.ts +4 -0
  5. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.d.ts +3 -0
  6. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +6 -0
  7. package/lib/components/AllProjectsDropdown/index.d.ts +1 -0
  8. package/lib/components/AppHeader/AppHeader.d.ts +4 -0
  9. package/lib/components/AppHeader/AppHeader.stories.d.ts +7 -0
  10. package/lib/components/AppHeader/index.d.ts +1 -0
  11. package/lib/components/AppHeader/types.d.ts +26 -0
  12. package/lib/components/GridLayout/types.d.ts +17 -0
  13. package/lib/components/Input/types.d.ts +1 -1
  14. package/lib/components/InputWithDropdown/types.d.ts +1 -1
  15. package/lib/components/Modal/types.d.ts +2 -0
  16. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  17. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +1 -0
  18. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +3 -0
  19. package/lib/index.d.ts +56 -4
  20. package/lib/index.esm.js +358 -97
  21. package/lib/index.esm.js.map +1 -1
  22. package/lib/index.js +359 -96
  23. package/lib/index.js.map +1 -1
  24. package/lib/tsconfig.tsbuildinfo +1 -1
  25. package/package.json +1 -1
  26. package/src/assets/Themes/BaseTheme.scss +5 -0
  27. package/src/assets/Themes/DarkTheme.scss +3 -0
  28. package/src/assets/icons/all_projects.svg +3 -0
  29. package/src/assets/icons/android_icon.svg +6 -0
  30. package/src/assets/icons/download_icon.svg +4 -0
  31. package/src/assets/icons/fireflink_icon.svg +4 -0
  32. package/src/assets/icons/fireflink_logo.svg +13 -0
  33. package/src/assets/icons/mobile_icon.svg +3 -0
  34. package/src/assets/icons/ms_dynamic.svg +4 -0
  35. package/src/assets/icons/sales_force.svg +7 -0
  36. package/src/assets/icons/switch_license_icon.svg +123 -0
  37. package/src/assets/icons/vertical_separator.svg +3 -0
  38. package/src/assets/icons/web&mobile_icon.svg +3 -0
  39. package/src/assets/icons/web_icon.svg +3 -0
  40. package/src/assets/styles/_colors.scss +2 -1
  41. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +70 -0
  42. package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +21 -0
  43. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +148 -0
  44. package/src/components/AllProjectsDropdown/index.ts +1 -0
  45. package/src/components/AppHeader/AppHeader.scss +67 -0
  46. package/src/components/AppHeader/AppHeader.stories.tsx +156 -0
  47. package/src/components/AppHeader/AppHeader.tsx +124 -0
  48. package/src/components/AppHeader/index.ts +1 -0
  49. package/src/components/AppHeader/types.ts +27 -0
  50. package/src/components/GridLayout/GridLayout.stories.tsx +13 -51
  51. package/src/components/GridLayout/GridLayout.tsx +9 -7
  52. package/src/components/GridLayout/types.ts +20 -0
  53. package/src/components/Icon/iconList.ts +26 -0
  54. package/src/components/IconButton/IconButton.scss +2 -1
  55. package/src/components/Input/types.ts +1 -1
  56. package/src/components/InputWithDropdown/types.ts +1 -3
  57. package/src/components/Modal/Modal.stories.tsx +6 -2
  58. package/src/components/Modal/Modal.tsx +6 -2
  59. package/src/components/Modal/modal.scss +6 -4
  60. package/src/components/Modal/types.ts +2 -0
  61. package/src/components/MultiSelect/MultiSelect.scss +8 -1
  62. package/src/components/MultiSelect/MultiSelect.stories.tsx +26 -0
  63. package/src/components/MultiSelect/MultiSelect.tsx +68 -12
  64. package/src/components/MultiSelect/MultiSelectTypes.ts +3 -0
  65. package/src/components/Select/Select.scss +1 -1
  66. package/src/index.ts +5 -0
  67. package/lib/components/ThemeProvider/CustomThemeProvider.d.ts +0 -8
  68. package/lib/hooks/useCustomThemeProvider.d.ts +0 -11
@@ -0,0 +1,148 @@
1
+ import { useState } from 'react';
2
+ import Icon from '../Icon';
3
+ import Typography from '../Typography';
4
+ import ffid from '../../utils/ffID/ffid';
5
+ import { truncateText } from '../../utils/truncateText/truncateText';
6
+ import './AllProjectsDropdown.scss';
7
+ import classNames from 'classnames';
8
+
9
+ const AllProjectsDropdown = () => {
10
+ const [showOptions, setShowOptions] = useState(false);
11
+ const [selectedOptions, setSelectedOptions] = useState({
12
+ label: 'All Projects',
13
+ value: 'All Projects',
14
+ iconName: 'all_projects',
15
+ });
16
+ const [search, setSearch] = useState(true);
17
+
18
+ let options = [
19
+ {
20
+ label: 'All Projects',
21
+ value: 'All Projects',
22
+ iconName: 'all_projects',
23
+ },
24
+ {
25
+ label: 'Pantaloon Project',
26
+ value: 'Pantaloon Web Project',
27
+ iconName: 'web_icon',
28
+ },
29
+ {
30
+ label: 'Mobile Project',
31
+ value: 'Mobile Project',
32
+ iconName: 'mobile_icon',
33
+ },
34
+ {
35
+ label: 'Web & Mobile Project',
36
+ value: 'Web & Mobile Project',
37
+ iconName: 'web&mobile_icon',
38
+ },
39
+ {
40
+ label: 'Sales Force',
41
+ value: 'Sales Force',
42
+ iconName: 'sales_force',
43
+ },
44
+ {
45
+ label: 'MS Dynamic',
46
+ value: 'MS Dynamic',
47
+ iconName: 'ms_dynamic',
48
+ },
49
+ {
50
+ label: 'Web Service',
51
+ value: 'Web Service',
52
+ iconName: '',
53
+ },
54
+ ];
55
+
56
+ const handleSelect = () => {
57
+ setShowOptions(!showOptions);
58
+ };
59
+
60
+ const handleSelectOption = (option: {
61
+ label: string;
62
+ value: string;
63
+ iconName: string;
64
+ }) => {
65
+ setSelectedOptions(option);
66
+ setShowOptions(false);
67
+ };
68
+
69
+ const handleInput = () => {
70
+ setSearch(false);
71
+ };
72
+
73
+ return (
74
+ <div className={classNames('ff-all-project')}>
75
+ <div
76
+ onClick={handleSelect}
77
+ className={classNames('ff-all-project-dropdown')}
78
+ >
79
+ <Typography
80
+ as={'div'}
81
+ lineHeight={'18px'}
82
+ fontSize={12}
83
+ fontWeight={'regular'}
84
+ className={classNames('projects-label')}
85
+ >
86
+ {truncateText(selectedOptions.label, 12)}
87
+ </Typography>
88
+ <div className={classNames('label-icon')}>
89
+ <Icon
90
+ name="arrows_down_icon"
91
+ color="var(--primary-icon-color)"
92
+ height={8}
93
+ width={8}
94
+ />
95
+ </div>
96
+ </div>
97
+ {showOptions && (
98
+ <div className={classNames('ff-dropdown')}>
99
+ <div className={classNames('ff-search')}>
100
+ {search && <Icon name="search" height={8} width={8} />}
101
+ <input
102
+ type="text"
103
+ placeholder="Search Project"
104
+ onClick={() => handleInput()}
105
+ />
106
+ </div>
107
+ <div
108
+ className={classNames(
109
+ 'option-card',
110
+ `${options.length > 4 ? 'scroll' : ''}`
111
+ )}
112
+ >
113
+ {options.map((option) => (
114
+ <div
115
+ key={ffid()}
116
+ onClick={() => handleSelectOption(option)}
117
+ className={classNames(
118
+ 'projects-options',
119
+ `${
120
+ option.label === 'All Projects' ? 'all-projects-option' : ''
121
+ }`
122
+ )}
123
+ >
124
+ <div className={classNames('projects-icons')}>
125
+ <Icon
126
+ name={option.iconName}
127
+ height={12}
128
+ width={12}
129
+ color={
130
+ option.label === 'All Projects'
131
+ ? 'var(--secondary-icon-color)'
132
+ : 'var(--primary-icon-color);'
133
+ }
134
+ />
135
+ </div>
136
+ <Typography key={ffid()} as={'div'} lineHeight={'30px'}>
137
+ {option.label}
138
+ </Typography>
139
+ </div>
140
+ ))}
141
+ </div>
142
+ </div>
143
+ )}
144
+ </div>
145
+ );
146
+ };
147
+
148
+ export default AllProjectsDropdown;
@@ -0,0 +1 @@
1
+ export { default } from './AllProjectsDropdown';
@@ -0,0 +1,67 @@
1
+ .ff-app-header {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ background-color: var(--brand-color);
5
+ padding-left: 8px;
6
+ border-top-left-radius: 8px;
7
+ border-top-right-radius: 8px;
8
+ .ff-app-header-logo-icon {
9
+ padding: 8px;
10
+ height: 24px;
11
+ }
12
+ .ff-app-header-nav-bar {
13
+ display: flex;
14
+ align-items: center;
15
+ background-color: var(--brand-color);
16
+ transform: translateY(12px);
17
+ border-radius: 20px;
18
+ padding: 5px;
19
+ .ff-app-header-nav-bar-items {
20
+ display: flex;
21
+ align-items: center;
22
+ .ff-app-header-nav-bar-item {
23
+ margin-left: 8px;
24
+ color: var(--ff-header-text-color);
25
+ cursor: pointer;
26
+ display: flex;
27
+ &--selected {
28
+ padding: 3px;
29
+ background-color: var(--primary-icon-color);
30
+ border-radius: 20px;
31
+ .ff-app-header-nav-bar-item-label {
32
+ background-color: var(--brand-color);
33
+ border-radius: 20px;
34
+ padding: 4px 8px;
35
+ }
36
+ }
37
+ .ff-app-header-submenu-container {
38
+ display: flex;
39
+ .ff-app-header-nav-bar-submenu-item {
40
+ color: var(--ff-header-submenu-text-color);
41
+ align-content: center;
42
+ padding-left: 8px;
43
+ &--selected{
44
+ color: var(--ff-header-submenu-highlight-text-color);
45
+ }
46
+ }
47
+ .ff-app-header-quickmenu-container {
48
+ display: flex;
49
+ align-items: center;
50
+ }
51
+ }
52
+ }
53
+ }
54
+ .ff-app-header-more-icon {
55
+ svg {
56
+ path {
57
+ fill: var(--primary-icon-color);
58
+ }
59
+ cursor: pointer;
60
+ }
61
+ }
62
+ }
63
+ .ff-app-header-right-content {
64
+ height: 24px;
65
+ padding: 8px;
66
+ }
67
+ }
@@ -0,0 +1,156 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import AppHeader from './AppHeader';
3
+ import Icon from '../Icon';
4
+ import { useState } from 'react';
5
+
6
+ const meta: Meta<typeof AppHeader> = {
7
+ title: 'Components/AppHeader',
8
+ component: AppHeader,
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ tags: ['autodocs'],
13
+ };
14
+
15
+ type Story = StoryObj<typeof AppHeader>;
16
+ const defaultArgs = {
17
+ logoIconName: 'fireflink_icon',
18
+ rightContent: (
19
+ <div>
20
+ <Icon name="logo" />
21
+ </div>
22
+ ),
23
+ };
24
+
25
+ const headerMenuItems = [
26
+ {
27
+ menuName: 'Dashboard',
28
+ subMenuItems: [],
29
+ },
30
+ {
31
+ menuName: 'Repo',
32
+ subMenuItems: [
33
+ {
34
+ subMenuName: 'Elements',
35
+ quickMenuItems: [],
36
+ },
37
+ {
38
+ subMenuName: 'Program Elements',
39
+ quickMenuItems: [],
40
+ },
41
+ {
42
+ subMenuName: 'Step Groups',
43
+ quickMenuItems: [
44
+ {
45
+ quickMenuName: 'Success Icon',
46
+ quickMenuIconName: 'success',
47
+ },
48
+ {
49
+ quickMenuName: 'Warning Icon',
50
+ quickMenuIconName: 'warning',
51
+ },
52
+ {
53
+ quickMenuName: 'Info Icon',
54
+ quickMenuIconName: 'info',
55
+ },
56
+ ],
57
+ },
58
+ ],
59
+ },
60
+ {
61
+ menuName: 'Test Data',
62
+ subMenuItems: [],
63
+ },
64
+ {
65
+ menuName: 'Test Dev',
66
+ subMenuItems: [
67
+ {
68
+ subMenuName: 'Scripts',
69
+ quickMenuItems: [
70
+ {
71
+ quickMenuName: 'Delete Icon',
72
+ quickMenuIconName: 'delete',
73
+ },
74
+ {
75
+ quickMenuName: 'Details Icon',
76
+ quickMenuIconName: 'details',
77
+ },
78
+ {
79
+ quickMenuName: 'Sun Icon',
80
+ quickMenuIconName: 'sun_icon',
81
+ },
82
+ {
83
+ quickMenuName: 'Moon Stars Icon',
84
+ quickMenuIconName: 'moon_stars_icon',
85
+ },
86
+ {
87
+ quickMenuName: 'Impact List Icon',
88
+ quickMenuIconName: 'impactList',
89
+ },
90
+ ],
91
+ },
92
+ {
93
+ subMenuName: 'Executions',
94
+ quickMenuItems: [],
95
+ },
96
+ ],
97
+ },
98
+ ];
99
+ const headerHiddenMenuItems = ['Configuration', 'Approval Request'];
100
+ const headerRightSideContent = (
101
+ <div>
102
+ <Icon name="logo" />
103
+ </div>
104
+ );
105
+
106
+ export const SampleAppHeader: Story = {
107
+ args: {
108
+ ...defaultArgs,
109
+ rightContent: (
110
+ <div>
111
+ <Icon name="logo" />
112
+ </div>
113
+ ),
114
+ appHeaderMenuItems: headerMenuItems,
115
+ appHeaderHiddenMenuItems: headerHiddenMenuItems,
116
+ selectedMenu: 'Repo',
117
+ },
118
+ };
119
+ export const Controlled: Story = {
120
+ render: () => {
121
+ const [selectedMenuItem, setSelectedMenuItem] = useState('Test Data');
122
+ const [selectedSubMenuItem, setSelectedSubMenuItem] = useState('');
123
+ const [selectedQuickMenuItem, setSelectedQuickMenuItem] = useState('');
124
+ const handleMenuClick = (item: string) => {
125
+ setSelectedMenuItem(item);
126
+ };
127
+ const handleSubMenuClick = (item: string) => {
128
+ setSelectedSubMenuItem(item);
129
+ };
130
+ const handleQuickMenuClick = (item: string) => {
131
+ setSelectedQuickMenuItem(item);
132
+ };
133
+
134
+ return (
135
+ <>
136
+ <div>
137
+ <AppHeader
138
+ logoIconName="fireflink_icon"
139
+ rightContent={headerRightSideContent}
140
+ appHeaderMenuItems={headerMenuItems}
141
+ appHeaderHiddenMenuItems={headerHiddenMenuItems}
142
+ projectsList={[]}
143
+ selectedMenu={selectedMenuItem}
144
+ selectedSubMenu={selectedSubMenuItem}
145
+ selectedQuickMenu={selectedQuickMenuItem}
146
+ onMenuClick={handleMenuClick}
147
+ onSubMenuClick={handleSubMenuClick}
148
+ onQuickMenuClick={handleQuickMenuClick}
149
+ />
150
+ </div>
151
+ </>
152
+ );
153
+ },
154
+ };
155
+
156
+ export default meta;
@@ -0,0 +1,124 @@
1
+ import { AppHeaderProps } from './types';
2
+ import Icon from '../Icon';
3
+ import './AppHeader.scss';
4
+ import classNames from 'classnames';
5
+ import Typography from '../Typography';
6
+
7
+ const AppHeader: React.FC<AppHeaderProps> = ({
8
+ logoIconName = 'fireflink_icon',
9
+ rightContent,
10
+ appHeaderMenuItems,
11
+ selectedMenu,
12
+ selectedSubMenu,
13
+ selectedQuickMenu,
14
+ onMenuClick = () => {},
15
+ onSubMenuClick = () => {},
16
+ onQuickMenuClick = () => {},
17
+ }) => {
18
+ return (
19
+ <>
20
+ <div className="ff-app-header">
21
+ <div className="ff-app-header-logo-icon">
22
+ <Icon color="" name={logoIconName} height={24} width={21} />
23
+ </div>
24
+ <div className="ff-app-header-nav-bar">
25
+ <div>All projects</div>
26
+ <div className="ff-app-header-nav-bar-items fontSm">
27
+ {appHeaderMenuItems.map((menuItem) => {
28
+ return (
29
+ <div
30
+ className={classNames('ff-app-header-nav-bar-item', {
31
+ ['ff-app-header-nav-bar-item--selected']:
32
+ menuItem.menuName === selectedMenu,
33
+ })}
34
+ key={menuItem.menuName}
35
+ onClick={() => onMenuClick(menuItem.menuName)}
36
+ >
37
+ <Typography
38
+ as="div"
39
+ className="ff-app-header-nav-bar-item-label"
40
+ lineHeight="18px"
41
+ >
42
+ {menuItem.menuName}
43
+ </Typography>
44
+ {menuItem.menuName === selectedMenu &&
45
+ menuItem?.subMenuItems &&
46
+ menuItem.subMenuItems.map((subMenuItem) => {
47
+ return (
48
+ <div
49
+ key={subMenuItem.subMenuName}
50
+ onClick={() =>
51
+ onSubMenuClick(subMenuItem.subMenuName)
52
+ }
53
+ className="ff-app-header-submenu-container"
54
+ >
55
+ <Typography
56
+ as="div"
57
+ className={classNames(
58
+ 'ff-app-header-nav-bar-submenu-item',
59
+ {
60
+ ['ff-app-header-nav-bar-submenu-item--selected']:
61
+ subMenuItem.subMenuName === selectedSubMenu,
62
+ }
63
+ )}
64
+ lineHeight="18px"
65
+ >
66
+ {subMenuItem.subMenuName}
67
+ </Typography>
68
+ {subMenuItem.subMenuName === selectedSubMenu &&
69
+ subMenuItem?.quickMenuItems && (
70
+ <div className="ff-app-header-quickmenu-container">
71
+ <div>
72
+ <Icon name="vertical_separator" />
73
+ </div>
74
+ {subMenuItem.quickMenuItems.map(
75
+ (quickMenuItem) => {
76
+ return (
77
+ <>
78
+ <div
79
+ key={quickMenuItem.quickMenuIconName}
80
+ onClick={() =>
81
+ onQuickMenuClick(
82
+ quickMenuItem.quickMenuName
83
+ )
84
+ }
85
+ className={classNames(
86
+ 'ff-app-header-nav-bar-quickmenu-item',
87
+ {
88
+ ['ff-app-header-nav-bar-quickmenu-item--selected']:
89
+ quickMenuItem.quickMenuName ===
90
+ selectedQuickMenu,
91
+ }
92
+ )}
93
+ >
94
+ <Icon
95
+ name={
96
+ quickMenuItem.quickMenuIconName
97
+ }
98
+ height={24}
99
+ width={24}
100
+ />
101
+ </div>
102
+ </>
103
+ );
104
+ }
105
+ )}
106
+ </div>
107
+ )}
108
+ </div>
109
+ );
110
+ })}
111
+ </div>
112
+ );
113
+ })}
114
+ </div>
115
+ <div>
116
+ <Icon name="more" className="ff-app-header-more-icon" />
117
+ </div>
118
+ </div>
119
+ <div className="ff-app-header-right-content">{rightContent}</div>
120
+ </div>
121
+ </>
122
+ );
123
+ };
124
+ export default AppHeader;
@@ -0,0 +1 @@
1
+ export { default } from "./AppHeader";
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface AppHeaderProps {
4
+ logoIconName: string;
5
+ rightContent: ReactNode;
6
+ projectsList: string[];
7
+ appHeaderMenuItems: appHeaderMenuItemProps[];
8
+ appHeaderHiddenMenuItems: string[];
9
+ selectedMenu: string;
10
+ selectedSubMenu : string;
11
+ selectedQuickMenu : string;
12
+ onMenuClick ?: (text: any) => void;
13
+ onSubMenuClick ?: (text: any) => void;
14
+ onQuickMenuClick ?: (text: any) => void;
15
+ }
16
+ export interface appHeaderMenuItemProps {
17
+ menuName: string;
18
+ subMenuItems: appHeaderSubMenuItemProps[];
19
+ }
20
+ export interface appHeaderSubMenuItemProps {
21
+ subMenuName: string;
22
+ quickMenuItems: appHeaderQuickMenuItemProps[];
23
+ }
24
+ export interface appHeaderQuickMenuItemProps {
25
+ quickMenuName: string;
26
+ quickMenuIconName: string;
27
+ }
@@ -1,6 +1,6 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import { Container, Row, Col } from './GridLayout';
3
- import './GridLayoutStory.scss'
3
+ import './GridLayoutStory.scss';
4
4
 
5
5
  const meta: Meta<typeof Container> = {
6
6
  title: 'Components/GridLayout',
@@ -27,31 +27,21 @@ export const Grid: ContainerStory = {
27
27
  <Container {...args}>
28
28
  <Row>
29
29
  <Col size={4}>
30
- <div className='one'>
31
- Column 1
32
- </div>
30
+ <div className="one">Column 1</div>
33
31
  </Col>
34
32
  <Col size={4}>
35
- <div className='two'>
36
- Column 2
37
- </div>
33
+ <div className="two">Column 2</div>
38
34
  </Col>
39
35
  <Col size={4}>
40
- <div className='three'>
41
- Column 3
42
- </div>
36
+ <div className="three">Column 3</div>
43
37
  </Col>
44
38
  </Row>
45
39
  <Row>
46
40
  <Col size={6}>
47
- <div className='four'>
48
- Column 4
49
- </div>
41
+ <div className="four">Column 4</div>
50
42
  </Col>
51
43
  <Col size={6}>
52
- <div className='five'>
53
- Column 5
54
- </div>
44
+ <div className="five">Column 5</div>
55
45
  </Col>
56
46
  </Row>
57
47
  </Container>
@@ -67,57 +57,29 @@ export const Grid2: ContainerStory = {
67
57
  <Container {...args}>
68
58
  <Row gap="20px">
69
59
  <Col size={3}>
70
- <div
71
- className='one'
72
- >
73
- Column 1 (size 3)
74
- </div>
60
+ <div className="one">Column 1 (size 3)</div>
75
61
  </Col>
76
62
  <Col size={6}>
77
- <div
78
- className='two'
79
- >
80
- Column 2 (size 6)
81
- </div>
63
+ <div className="two">Column 2 (size 6)</div>
82
64
  </Col>
83
65
  <Col size={3}>
84
- <div
85
- className='three'
86
- >
87
- Column 3 (size 3)
88
- </div>
66
+ <div className="three">Column 3 (size 3)</div>
89
67
  </Col>
90
68
  </Row>
91
69
  <Row gap="10px">
92
70
  <Col size={4}>
93
- <div
94
- className='four'
95
- >
96
- Column 4 (size 4)
97
- </div>
71
+ <div className="four">Column 4 (size 4)</div>
98
72
  </Col>
99
73
  <Col size={4}>
100
- <div
101
- className='five'
102
- >
103
- Column 5 (size 4)
104
- </div>
74
+ <div className="five">Column 5 (size 4)</div>
105
75
  </Col>
106
76
  <Col size={4}>
107
- <div
108
- className='one'
109
- >
110
- Column 6 (size 4)
111
- </div>
77
+ <div className="one">Column 6 (size 4)</div>
112
78
  </Col>
113
79
  </Row>
114
80
  <Row gap="15px">
115
81
  <Col size={12}>
116
- <div
117
- className='two'
118
- >
119
- Full-width column (size 12)
120
- </div>
82
+ <div className="two">Full-width column (size 12)</div>
121
83
  </Col>
122
84
  </Row>
123
85
  </Container>
@@ -2,29 +2,31 @@
2
2
  import React from 'react';
3
3
  import './GridLayout.scss';
4
4
  import { ContainerProps, RowProps, ColProps } from './types';
5
+ import cx from 'classnames'
5
6
 
6
7
  export const Container: React.FC<ContainerProps> = ({
7
8
  children,
8
9
  fluid = false,
9
10
  gap = '0px',
11
+ className=''
10
12
  }) => {
11
- const className = fluid ? 'ff-container-fluid' : 'ff-container';
13
+ const containerClassName = fluid ? 'ff-container-fluid' : 'ff-container';
12
14
  return (
13
- <div className={className} style={{ gap }}>
15
+ <div className={cx(containerClassName,className)} style={{ gap }}>
14
16
  {children}
15
17
  </div>
16
18
  );
17
19
  };
18
20
 
19
- export const Row: React.FC<RowProps> = ({ children, gap = '0px' }) => {
21
+ export const Row: React.FC<RowProps> = ({ children, gap = '0px',className='' }) => {
20
22
  return (
21
- <div className="ff-row" style={{ gap }}>
23
+ <div className={cx("ff-row",className)} style={{ gap }}>
22
24
  {children}
23
25
  </div>
24
26
  );
25
27
  };
26
28
 
27
- export const Col: React.FC<ColProps> = ({ children, size = 12 }) => {
28
- const className = `ff-col-${size}`;
29
- return <div className={className}>{children}</div>;
29
+ export const Col: React.FC<ColProps> = ({ children, size = 12,className='' }) => {
30
+ const colClassName = `ff-col-${size}`;
31
+ return <div className={cx(colClassName,className)}>{children}</div>;
30
32
  };