@integrigo/integrigo-ui 1.6.18-c → 1.6.18-e

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 (39) hide show
  1. package/lib/index.d.ts +2 -1
  2. package/lib/index.esm.js +1 -1
  3. package/lib/index.esm.js.map +1 -1
  4. package/lib/index.js +1 -1
  5. package/lib/index.js.map +1 -1
  6. package/lib/src/components/atoms/Avatar/Avatar.stories.d.ts +2 -2
  7. package/lib/src/components/atoms/Dot/Dot.stories.d.ts +6 -6
  8. package/lib/src/components/atoms/Gradient/Gradient.stories.d.ts +2 -2
  9. package/lib/src/components/atoms/Icon/Icon.d.ts +1 -0
  10. package/lib/src/components/atoms/Icon/Icon.stories.d.ts +2 -2
  11. package/lib/src/components/atoms/Icon/icons/ArrowCircleRight.d.ts +3 -0
  12. package/lib/src/components/atoms/Initials/Initials.stories.d.ts +2 -2
  13. package/lib/src/components/molecules/Checkbox/Checkbox.stories.d.ts +4 -4
  14. package/lib/src/components/molecules/IconButton/IconButton.d.ts +7 -0
  15. package/lib/src/components/molecules/IconButton/IconButton.stories.d.ts +5 -0
  16. package/lib/src/components/molecules/IconButton/index.d.ts +1 -0
  17. package/lib/src/components/molecules/Input/Input.d.ts +1 -1
  18. package/lib/src/components/molecules/Input/Input.stories.d.ts +18 -18
  19. package/lib/src/components/molecules/Profile/Profile.stories.d.ts +3 -3
  20. package/lib/src/components/molecules/TextArea/TextArea.d.ts +3 -2
  21. package/lib/src/components/molecules/index.d.ts +1 -0
  22. package/lib/src/components/organisms/Comment/Comment.d.ts +11 -0
  23. package/lib/src/components/organisms/Comment/Comment.stories.d.ts +5 -0
  24. package/lib/src/components/organisms/Comment/index.d.ts +1 -0
  25. package/lib/src/components/organisms/index.d.ts +1 -0
  26. package/lib/src/index.d.ts +4 -4
  27. package/package.json +1 -1
  28. package/src/components/atoms/Icon/Icon.tsx +2 -0
  29. package/src/components/atoms/Icon/icons/ArrowCircleRight.tsx +9 -0
  30. package/src/components/molecules/IconButton/IconButton.stories.tsx +18 -0
  31. package/src/components/molecules/IconButton/IconButton.tsx +60 -0
  32. package/src/components/molecules/IconButton/index.ts +1 -0
  33. package/src/components/molecules/TextArea/TextArea.tsx +4 -4
  34. package/src/components/molecules/index.ts +2 -1
  35. package/src/components/organisms/Comment/Comment.stories.tsx +29 -0
  36. package/src/components/organisms/Comment/Comment.tsx +59 -0
  37. package/src/components/organisms/Comment/index.ts +1 -0
  38. package/src/components/organisms/index.ts +2 -1
  39. package/src/index.ts +12 -4
@@ -0,0 +1,59 @@
1
+ import React from "react";
2
+ import styled from "styled-components";
3
+ import { Avatar, DateTime, Typography } from "../../atoms";
4
+
5
+ export interface CommentProps {
6
+ avatar: {
7
+ src: string;
8
+ alt: string;
9
+ };
10
+ body: string;
11
+ author: string;
12
+ createdAt: Date;
13
+ }
14
+
15
+ export const Comment: React.FC<CommentProps> = ({
16
+ avatar,
17
+ body,
18
+ author,
19
+ createdAt,
20
+ }) => {
21
+ return (
22
+ <Root>
23
+ <Avatar {...avatar} />
24
+
25
+ <NameAndDate>
26
+ <Typography.Hero size="s">{author}</Typography.Hero>
27
+ <DateTime date={createdAt} />
28
+ </NameAndDate>
29
+
30
+ <div />
31
+
32
+ <Typography.Body>{body}</Typography.Body>
33
+ </Root>
34
+ );
35
+ };
36
+
37
+ const Root = styled.div`
38
+ display: grid;
39
+ grid-template-columns: 32px auto;
40
+ grid-template-rows: 32px auto;
41
+ column-gap: var(--padding-m);
42
+ row-gap: var(--padding-m);
43
+
44
+ & > p {
45
+ margin: 0;
46
+ }
47
+ `;
48
+
49
+ const NameAndDate = styled.div`
50
+ display: flex;
51
+ justify-content: space-between;
52
+ align-items: center;
53
+ flex-wrap: wrap;
54
+
55
+ & > h5 {
56
+ margin: 0;
57
+ color: var(--color-orange);
58
+ }
59
+ `;
@@ -0,0 +1 @@
1
+ export { Comment } from './Comment'
@@ -2,4 +2,5 @@ export { Menu } from './Menu';
2
2
  export { Setting } from './Setting';
3
3
  export { Modal } from './Modal';
4
4
  export { Select } from './Select';
5
- export { Table } from './Table';
5
+ export { Table } from './Table';
6
+ export { Comment } from './Comment'
package/src/index.ts CHANGED
@@ -12,7 +12,7 @@ export {
12
12
  Chip,
13
13
  Dot,
14
14
  Gradient,
15
- } from './components/atoms';
15
+ } from "./components/atoms";
16
16
 
17
17
  export {
18
18
  InfoCard,
@@ -25,8 +25,16 @@ export {
25
25
  Radio,
26
26
  Tile,
27
27
  Switch,
28
- } from './components/molecules';
28
+ IconButton,
29
+ } from "./components/molecules";
29
30
 
30
- export { Menu, Setting, Modal, Select, Table } from './components/organisms';
31
+ export {
32
+ Menu,
33
+ Setting,
34
+ Modal,
35
+ Select,
36
+ Table,
37
+ Comment,
38
+ } from "./components/organisms";
31
39
 
32
- export { GlobalStyles as IntegrigoUI, Color } from './styles';
40
+ export { GlobalStyles as IntegrigoUI, Color } from "./styles";