contentoh-components-library 21.4.3 → 21.4.4

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 (103) hide show
  1. package/.env.development +0 -1
  2. package/.env.production +0 -1
  3. package/dist/assets/fonts/roboto/LICENSE.txt +202 -0
  4. package/dist/components/atoms/Avatar/index.js +2 -3
  5. package/dist/components/atoms/CheckBox/index.js +1 -4
  6. package/dist/components/atoms/CheckBox/styles.js +1 -1
  7. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +28 -41
  8. package/dist/components/pages/RetailerProductEdition/index.js +0 -23
  9. package/dist/global-files/customHooks.js +0 -1
  10. package/dist/index.js +58 -201
  11. package/package.json +1 -2
  12. package/src/components/atoms/Avatar/index.js +2 -8
  13. package/src/components/atoms/CheckBox/index.js +1 -2
  14. package/src/components/atoms/CheckBox/styles.js +0 -2
  15. package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
  16. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +21 -39
  17. package/src/components/pages/RetailerProductEdition/index.js +0 -12
  18. package/src/global-files/customHooks.js +0 -1
  19. package/src/index.js +0 -12
  20. package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -90
  21. package/dist/components/atoms/ImageCarousel/index.js +0 -120
  22. package/dist/components/atoms/ImageCarousel/styles.js +0 -18
  23. package/dist/components/atoms/PercentTag/PercentTag.stories.js +0 -31
  24. package/dist/components/atoms/PercentTag/index.js +0 -23
  25. package/dist/components/atoms/PercentTag/styles.js +0 -22
  26. package/dist/components/atoms/RatingStars/RatingStars.stories.js +0 -30
  27. package/dist/components/atoms/RatingStars/index.js +0 -53
  28. package/dist/components/atoms/RatingStars/styles.js +0 -18
  29. package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -48
  30. package/dist/components/atoms/RetailerCatalog/index.js +0 -70
  31. package/dist/components/atoms/RetailerCatalog/styles.js +0 -20
  32. package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +0 -33
  33. package/dist/components/atoms/RetailerOption/index.js +0 -62
  34. package/dist/components/atoms/RetailerOption/styles.js +0 -20
  35. package/dist/components/atoms/RetailersList/RetailersList.stories.js +0 -45
  36. package/dist/components/atoms/RetailersList/index.js +0 -46
  37. package/dist/components/atoms/RetailersList/styles.js +0 -18
  38. package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +0 -73
  39. package/dist/components/atoms/UserCatalog/index.js +0 -103
  40. package/dist/components/atoms/UserCatalog/styles.js +0 -18
  41. package/dist/components/atoms/UserOption/UserOption.stories.js +0 -40
  42. package/dist/components/atoms/UserOption/index.js +0 -128
  43. package/dist/components/atoms/UserOption/styles.js +0 -20
  44. package/dist/components/atoms/UserSelector/UserSelector.stories.js +0 -40
  45. package/dist/components/atoms/UserSelector/index.js +0 -100
  46. package/dist/components/atoms/UserSelector/styles.js +0 -32
  47. package/dist/components/molecules/GridItem/GridItem.stories.js +0 -123
  48. package/dist/components/molecules/GridItem/index.js +0 -123
  49. package/dist/components/molecules/GridItem/styles.js +0 -20
  50. package/dist/components/molecules/HeaderItem/ColumnItem.js +0 -23
  51. package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +0 -70
  52. package/dist/components/molecules/HeaderItem/index.js +0 -42
  53. package/dist/components/molecules/HeaderItem/styles.js +0 -30
  54. package/dist/components/molecules/RowItem/ColumnItem.js +0 -23
  55. package/dist/components/molecules/RowItem/RowItem.stories.js +0 -5242
  56. package/dist/components/molecules/RowItem/index.js +0 -58
  57. package/dist/components/molecules/RowItem/styles.js +0 -30
  58. package/dist/components/organisms/GridProducts/GridProducts.stories.js +0 -5097
  59. package/dist/components/organisms/GridProducts/index.js +0 -63
  60. package/dist/components/organisms/GridProducts/styles.js +0 -18
  61. package/dist/components/organisms/GridProducts/utils.js +0 -144
  62. package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
  63. package/src/components/atoms/ImageCarousel/index.js +0 -103
  64. package/src/components/atoms/ImageCarousel/styles.js +0 -79
  65. package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
  66. package/src/components/atoms/PercentTag/index.js +0 -9
  67. package/src/components/atoms/PercentTag/styles.js +0 -69
  68. package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
  69. package/src/components/atoms/RatingStars/index.js +0 -31
  70. package/src/components/atoms/RatingStars/styles.js +0 -28
  71. package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
  72. package/src/components/atoms/RetailerCatalog/index.js +0 -49
  73. package/src/components/atoms/RetailerCatalog/styles.js +0 -30
  74. package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
  75. package/src/components/atoms/RetailerOption/index.js +0 -53
  76. package/src/components/atoms/RetailerOption/styles.js +0 -41
  77. package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
  78. package/src/components/atoms/RetailersList/index.js +0 -20
  79. package/src/components/atoms/RetailersList/styles.js +0 -19
  80. package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
  81. package/src/components/atoms/UserCatalog/index.js +0 -96
  82. package/src/components/atoms/UserCatalog/styles.js +0 -24
  83. package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
  84. package/src/components/atoms/UserOption/index.js +0 -88
  85. package/src/components/atoms/UserOption/styles.js +0 -61
  86. package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
  87. package/src/components/atoms/UserSelector/index.js +0 -88
  88. package/src/components/atoms/UserSelector/styles.js +0 -55
  89. package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
  90. package/src/components/molecules/GridItem/index.js +0 -83
  91. package/src/components/molecules/GridItem/styles.js +0 -85
  92. package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
  93. package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
  94. package/src/components/molecules/HeaderItem/index.js +0 -26
  95. package/src/components/molecules/HeaderItem/styles.js +0 -27
  96. package/src/components/molecules/RowItem/ColumnItem.js +0 -9
  97. package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
  98. package/src/components/molecules/RowItem/index.js +0 -45
  99. package/src/components/molecules/RowItem/styles.js +0 -38
  100. package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
  101. package/src/components/organisms/GridProducts/index.js +0 -50
  102. package/src/components/organisms/GridProducts/styles.js +0 -15
  103. package/src/components/organisms/GridProducts/utils.js +0 -108
@@ -1,88 +0,0 @@
1
- import { Container } from "./styles";
2
- import { faSearch } from "@fortawesome/free-solid-svg-icons";
3
- import { FontAwesomeIcon as Icon } from "@fortawesome/react-fontawesome";
4
- import { Avatar } from "../Avatar";
5
- import { getProfilePicture } from "../../../global-files/data";
6
- import { useState } from "react";
7
- import { useEffect } from "react";
8
- import { useCloseModal } from "../../../global-files/customHooks";
9
-
10
- export const UserSelector = ({
11
- searchLabel,
12
- usersArray,
13
- position,
14
- id,
15
- onAssign,
16
- product,
17
- assignationTarget,
18
- target,
19
- concept,
20
- }) => {
21
- const [text, setText] = useState([]);
22
- const [userFiltered, setUsersFiltered] = useState([]);
23
-
24
- useEffect(() => {
25
- if (usersArray) setUsersFiltered(usersArray);
26
- }, [usersArray]);
27
-
28
- const onChangeText = (e) => {
29
- setText(e.target.value);
30
- if (usersArray)
31
- setUsersFiltered(
32
- usersArray.filter((user) =>
33
- (user.name + " " + user.last_name)
34
- .toLowerCase()
35
- .includes(e.target.value.toLowerCase())
36
- )
37
- );
38
- };
39
-
40
- return (
41
- <Container position={position} id={id + "users-list"}>
42
- <div className="search-cotainer">
43
- <Icon icon={faSearch} />
44
- <input
45
- type="text"
46
- className="search"
47
- placeholder={searchLabel}
48
- value={text}
49
- onChange={onChangeText}
50
- autoFocus
51
- />
52
- </div>
53
- <div className="selector-container">
54
- {userFiltered.length ? (
55
- userFiltered.map((user) => (
56
- <div
57
- key={user.id_user}
58
- className="user-item"
59
- onClick={(e) =>
60
- onAssign &&
61
- onAssign(
62
- product,
63
- user.id_user,
64
- assignationTarget,
65
- target,
66
- concept
67
- )
68
- }
69
- >
70
- <Avatar
71
- image={getProfilePicture(user.id_user, 26, 26)}
72
- altText={"profile image"}
73
- imageType={"medium-image"}
74
- />
75
- <p>
76
- {user.name} {user.last_name}
77
- </p>
78
- </div>
79
- ))
80
- ) : (
81
- <div>
82
- <p>Sin usuarios para asignar</p>
83
- </div>
84
- )}
85
- </div>
86
- </Container>
87
- );
88
- };
@@ -1,55 +0,0 @@
1
- import styled from "styled-components";
2
- import { FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- box-shadow: 0px 2px 4px #00000040;
6
- width: 197px;
7
- border-radius: 5px;
8
- position: ${({ position }) => (position ? position : "initial")};
9
- top: ${({ position }) => (position ? "100%" : "initial")};
10
- left: ${({ position }) => (position ? "50%" : "initial")};
11
- transform: ${({ position }) => (position ? "translateX(-50%)" : "initial")};
12
- z-index: 500;
13
- background-color: white;
14
-
15
- .search-cotainer {
16
- display: flex;
17
- padding-left: 10px;
18
- align-items: center;
19
- border-bottom: 1px solid #f0f0f0;
20
-
21
- svg {
22
- & + * {
23
- margin-left: 10px;
24
- }
25
- }
26
-
27
- input {
28
- border: none;
29
- width: 100%;
30
- padding: 10px;
31
- outline: none;
32
- }
33
- }
34
-
35
- .selector-container {
36
- max-height: 184px;
37
- overflow: auto;
38
- .user-item {
39
- display: flex;
40
- font-family: ${FontFamily.Lato};
41
- font-size: 12px;
42
- align-items: center;
43
- padding: 10px;
44
- cursor: pointer;
45
-
46
- &:hover {
47
- background-color: #f0f0f0;
48
- }
49
-
50
- > * + * {
51
- margin-left: 10px;
52
- }
53
- }
54
- }
55
- `;
@@ -1,126 +0,0 @@
1
- import { GridItem } from ".";
2
-
3
- export default { title: "Components/molecules/GridItem", component: GridItem };
4
-
5
- const Template = (args) => <GridItem {...args} />;
6
- export const GridItemDefault = Template.bind({});
7
- GridItemDefault.args = {
8
- article: {
9
- services: {
10
- datasheets: 1,
11
- descriptions: 1,
12
- images: 1,
13
- },
14
- orderId: 15254,
15
- status: "Ex",
16
- datasheet_status: "Ex",
17
- prio: "none",
18
- version: 15,
19
- description_status: "Ex",
20
- images_status: "Ex",
21
- statusByRetailer: {
22
- 70: {
23
- datasheet: "Ex",
24
- description: "Ex",
25
- images: "Ex",
26
- },
27
- },
28
- id_article: 38443,
29
- id_category: "4319",
30
- name: "Im Polvo Compacto Natural 2",
31
- upc: "7501611823017",
32
- timestamp: "2023-03-15T05:54:54.000Z",
33
- id_user: 133,
34
- status: "Ex",
35
- active: 1,
36
- company_id: 912,
37
- company_name: "GRUPO BRAHMA",
38
- country: "México",
39
- id_order: 15254,
40
- id_datasheet_especialist: 1841,
41
- id_datasheet_facilitator: null,
42
- id_description_especialist: 509,
43
- id_description_facilitator: null,
44
- id_images_especialist: 289,
45
- id_images_facilitator: 160,
46
- id_auditor: 493,
47
- id_recepcionist: null,
48
- category: "Salud y Belleza|Cosméticos|Cosméticos",
49
- missingAttributes: 0,
50
- missingDescriptions: 0,
51
- missingImages: 0,
52
- retailers: [
53
- {
54
- id: 70,
55
- name: "Bodega Aurrera",
56
- },
57
- ],
58
- country: "México",
59
- upc: "7501611823017",
60
- imageArray: [
61
- {
62
- id: 35596,
63
- status: null,
64
- image_id: 1,
65
- packing_type: "3",
66
- image_type: "1",
67
- article_id: "38443",
68
- src: "https://d24s337exbt5zr.cloudfront.net/eyJidWNrZXQiOiJjb250ZW50LW1hbmFnZW1lbnQtaW1hZ2VzIiwia2V5IjoiaWQtMzg0NDMvMTUvMS1kNDQ2ZjIwNy0wYTkzLTQyNzgtYWZjNi01MTY2ZjIyY2EzNDMucG5nIiwiZWRpdHMiOnsicmVzaXplIjp7IndpZHRoIjoxMDAwLCJoZWlnaHQiOjEwMDAsImZpdCI6ImNvbnRhaW4iLCJiYWNrZ3JvdW5kIjp7InIiOjI1NSwiZyI6MjU1LCJiIjoyNTUsImFscGhhIjoxfX19fQ==",
69
- timestamp: "2023-05-30T03:01:12.000Z",
70
- id_version: 15,
71
- width: null,
72
- height: null,
73
- scene_type: null,
74
- image_shot_type: null,
75
- last_modified: "2023-06-05T23:49:49.000Z",
76
- name: "Central (Frente Comercial)",
77
- version: 15,
78
- ext: "png",
79
- uuid: "d446f207-0a93-4278-afc6-5166f22ca343",
80
- srcDB: "id-38443/15/1-d446f207-0a93-4278-afc6-5166f22ca343.png",
81
- },
82
- {
83
- id: 35597,
84
- status: null,
85
- image_id: 3,
86
- packing_type: "3",
87
- image_type: "1",
88
- article_id: "38443",
89
- src: "https://d24s337exbt5zr.cloudfront.net/eyJidWNrZXQiOiJjb250ZW50LW1hbmFnZW1lbnQtaW1hZ2VzIiwia2V5IjoiaWQtMzg0NDMvMTUvMy0yOTZkMzU3ZC00OTUzLTRiMzktYjFjMy04YWZmZDI2NDgwMWIucG5nIiwiZWRpdHMiOnsicmVzaXplIjp7IndpZHRoIjoxMDAwLCJoZWlnaHQiOjEwMDAsImZpdCI6ImNvbnRhaW4iLCJiYWNrZ3JvdW5kIjp7InIiOjI1NSwiZyI6MjU1LCJiIjoyNTUsImFscGhhIjoxfX19fQ==",
90
- timestamp: "2023-05-30T03:01:12.000Z",
91
- id_version: 15,
92
- width: null,
93
- height: null,
94
- scene_type: null,
95
- image_shot_type: null,
96
- last_modified: "2023-06-05T23:49:49.000Z",
97
- name: "Trasera (Back)",
98
- version: 15,
99
- ext: "png",
100
- uuid: "296d357d-4953-4b39-b1c3-8affd264801b",
101
- srcDB: "id-38443/15/3-296d357d-4953-4b39-b1c3-8affd264801b.png",
102
- },
103
- {
104
- id: 35598,
105
- status: null,
106
- image_id: 16,
107
- packing_type: "3",
108
- image_type: "1",
109
- article_id: "38443",
110
- src: "https://d24s337exbt5zr.cloudfront.net/eyJidWNrZXQiOiJjb250ZW50LW1hbmFnZW1lbnQtaW1hZ2VzIiwia2V5IjoiaWQtMzg0NDMvMTUvMTYtOGMzNDIzM2YtZTRiMC00MjU0LWFlYzUtZjEyN2ZiYjhkYmVkLnBuZyIsImVkaXRzIjp7InJlc2l6ZSI6eyJ3aWR0aCI6MTAwMCwiaGVpZ2h0IjoxMDAwLCJmaXQiOiJjb250YWluIiwiYmFja2dyb3VuZCI6eyJyIjoyNTUsImciOjI1NSwiYiI6MjU1LCJhbHBoYSI6MX19fX0=",
111
- timestamp: "2023-05-30T03:01:12.000Z",
112
- id_version: 15,
113
- width: null,
114
- height: null,
115
- scene_type: null,
116
- image_shot_type: null,
117
- last_modified: "2023-06-05T23:49:49.000Z",
118
- name: "Detalle / Características 1",
119
- version: 15,
120
- ext: "png",
121
- uuid: "8c34233f-e4b0-4254-aec5-f127fbb8dbed",
122
- srcDB: "id-38443/15/16-8c34233f-e4b0-4254-aec5-f127fbb8dbed.png",
123
- },
124
- ],
125
- },
126
- };
@@ -1,83 +0,0 @@
1
- import { Container } from "./styles";
2
- import { ImageCarousel } from "../../atoms/ImageCarousel";
3
- import { Status } from "../../atoms/Status";
4
- import { PercentTag } from "../../atoms/PercentTag";
5
- import { ButtonV2 } from "../../atoms/ButtonV2";
6
- import { faStar as starIcon } from "@fortawesome/free-regular-svg-icons";
7
- import { faCartPlus as cartIcon } from "@fortawesome/free-solid-svg-icons";
8
- import { RatingStars } from "../../atoms/RatingStars";
9
- import { CheckBox } from "../../atoms/CheckBox";
10
-
11
- export const GridItem = ({
12
- gridElement = {},
13
- product,
14
- id,
15
- isMerchans,
16
- chkOnChange,
17
- onGridClick,
18
- chkChecked,
19
- index,
20
- }) => {
21
- const { images = [], info = [], status = [], catalogs = {} } = gridElement;
22
-
23
- return (
24
- <Container onClick={(e) => onGridClick && onGridClick(e, product, index)}>
25
- <div className="chk-container" onClick={(e) => e.stopPropagation()}>
26
- <CheckBox
27
- id={id}
28
- name={id}
29
- className="chk-absolute"
30
- onChange={(e) => chkOnChange && chkOnChange(e, product)}
31
- defaultChecked={chkChecked && chkChecked(product)}
32
- />
33
- </div>
34
- <ImageCarousel imageArray={images} />
35
- <div className="data-body">
36
- {info?.map((item, i) =>
37
- i === 0 ? <h3 key={i}>{item.value}</h3> : <p key={i}>{item.value}</p>
38
- )}
39
- </div>
40
- <div className="status-slider">
41
- {status?.map((item) => (
42
- <>
43
- <Status statusType={item.value} />
44
- <PercentTag percent={item.percent} progressBarType={item.value} />
45
- </>
46
- ))}
47
- </div>
48
- {isMerchans ? (
49
- <div className="cart-and-raiting">
50
- <ButtonV2
51
- borderType="circle"
52
- type="whiteS2"
53
- icon={starIcon}
54
- size={10}
55
- className="star-button"
56
- />
57
- <ButtonV2
58
- borderType="circle"
59
- type="whiteS2"
60
- icon={cartIcon}
61
- size={10}
62
- className="star-button"
63
- />
64
- <ButtonV2
65
- borderType="circle"
66
- type="whiteS2"
67
- icon={cartIcon}
68
- size={10}
69
- className="star-button"
70
- />
71
- <RatingStars ratingValue={4} />
72
- </div>
73
- ) : (
74
- catalogs && (
75
- <div className="retailers-and-user">
76
- <div className="retailers-container">{catalogs.leftSide}</div>
77
- <div className="users-container">{catalogs.rightSide}</div>
78
- </div>
79
- )
80
- )}
81
- </Container>
82
- );
83
- };
@@ -1,85 +0,0 @@
1
- import styled from "styled-components";
2
- import { FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- width: 175px;
6
- border: 1px solid #f0f0f0;
7
- position: relative;
8
-
9
- .chk-container {
10
- position: absolute;
11
- top: 5px;
12
- left: 5px;
13
- z-index: 5;
14
- height: 16px;
15
- }
16
-
17
- .data-body {
18
- padding: 10px;
19
- border-bottom: 1px solid #f0f0f0;
20
-
21
- h3,
22
- p {
23
- color: #262626;
24
- font-family: ${FontFamily.Lato};
25
- font-size: 12px;
26
- line-height: 16px;
27
- overflow: hidden;
28
- white-space: nowrap;
29
- text-overflow: ellipsis;
30
-
31
- & + p {
32
- margin-top: 5px;
33
- }
34
- }
35
- p {
36
- font-size: 10px;
37
- line-height: 12px;
38
- color: #808080;
39
- }
40
- }
41
-
42
- .status-slider {
43
- display: flex;
44
- padding: 5px 10px;
45
- overflow: auto;
46
- border-bottom: 1px solid #f0f0f0;
47
- flex-wrap: nowrap;
48
-
49
- .status-element {
50
- display: flex;
51
- }
52
-
53
- * + * {
54
- margin-left: 10px;
55
- }
56
- }
57
-
58
- .cart-and-raiting,
59
- .retailers-and-user {
60
- display: flex;
61
- align-items: center;
62
- justify-content: space-between;
63
- padding: 5px 10px;
64
- .star-button {
65
- button {
66
- padding: 3px;
67
- color: transparent;
68
- -webkit-text-stroke: 1px #808080;
69
- }
70
- }
71
- }
72
-
73
- .retailers-and-user {
74
- padding: 0;
75
- > * {
76
- flex: 1 0 50%;
77
- display: flex;
78
- padding: 5px;
79
- height: 36px;
80
- }
81
- .retailers-container {
82
- border-right: 1px solid #f0f0f0;
83
- }
84
- }
85
- `;
@@ -1,9 +0,0 @@
1
- import { Column } from "./styles";
2
-
3
- export const ColumnItem = ({ name, flex, minWidth }) => {
4
- return (
5
- <Column flex={flex} minWidth={minWidth}>
6
- {name}
7
- </Column>
8
- );
9
- };
@@ -1,24 +0,0 @@
1
- import { HeaderItem } from ".";
2
-
3
- export default {
4
- title: "Components/molecules/HeaderItem",
5
- component: HeaderItem,
6
- };
7
-
8
- const Template = (args) => <HeaderItem {...args} />;
9
- export const HeaderItemDefault = Template.bind({});
10
-
11
- HeaderItemDefault.args = {
12
- columnsArray: [
13
- { name: "Reg", flex: 1, minWidth: 100 },
14
- { name: "Orden", flex: 1, minWidth: 100 },
15
- { name: "UPC", flex: 1, minWidth: 100 },
16
- { name: "Nombre", flex: 1, minWidth: 100 },
17
- { name: "Marca", flex: 1, minWidth: 100 },
18
- { name: "Estatus", flex: 1, minWidth: 100 },
19
- { name: "Cadenas", flex: 1, minWidth: 100 },
20
- { name: "Prio", flex: 1, minWidth: 100 },
21
- { name: "E.D", flex: 1, minWidth: 100 },
22
- { name: "Cont.", flex: 1, minWidth: 100 },
23
- ],
24
- };
@@ -1,26 +0,0 @@
1
- import { Container } from "./styles";
2
- import { ColumnItem } from "./ColumnItem";
3
- import { CheckBox } from "../../atoms/CheckBox";
4
-
5
- export const HeaderItem = ({ columnsArray = [], checkAll, chkCheckedAll }) => {
6
- return (
7
- <Container>
8
- <div className="chk-global-container">
9
- <CheckBox
10
- id={"chk-global"}
11
- name={"chk-global"}
12
- onChange={(e) => checkAll && checkAll(e)}
13
- checked={chkCheckedAll && chkCheckedAll()}
14
- />
15
- </div>
16
- {columnsArray.map((col, i) => (
17
- <ColumnItem
18
- key={i}
19
- flex={col.flex}
20
- name={col.name}
21
- minWidth={col.minWidth}
22
- />
23
- ))}
24
- </Container>
25
- );
26
- };
@@ -1,27 +0,0 @@
1
- import styled from "styled-components";
2
- import { FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- background-color: #f0f0f0;
6
- display: flex;
7
- width: 100%;
8
- min-width: fit-content;
9
-
10
- .chk-global-container {
11
- display: flex;
12
- align-items: center;
13
- justify-content: center;
14
- min-width: 30px;
15
- }
16
- `;
17
-
18
- export const Column = styled.div`
19
- flex: ${({ flex }) => (flex ? flex : 1)};
20
- min-width: ${({ minWidth }) => (minWidth ? minWidth : 100)}px;
21
- text-align: center;
22
- color: #262626;
23
- font-family: ${FontFamily.Lato};
24
- font-size: 12px;
25
- line-height: 16px;
26
- padding: 10px 5px;
27
- `;
@@ -1,9 +0,0 @@
1
- import { Column } from "./styles";
2
-
3
- export const ColumnItem = ({ element, flex, minWidth }) => {
4
- return (
5
- <Column flex={flex} minWidth={minWidth}>
6
- {element}
7
- </Column>
8
- );
9
- };