@cyber-harbour/ui 1.0.29 → 1.0.31

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyber-harbour/ui",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -109,10 +109,9 @@ const StyledButton = styled(createComponent('button'))<{
109
109
  ${getCss(getButtonStyles(theme, $variant, $color, 'disabled'))}
110
110
  }
111
111
 
112
- svg {
112
+ ${StyledIconWrapper} svg {
113
113
  width: ${sizes.iconSize};
114
114
  height: ${sizes.iconSize};
115
-
116
115
  }
117
116
 
118
117
  ${
@@ -0,0 +1,44 @@
1
+ import styled from 'styled-components';
2
+
3
+ export interface EmptyDataProps {
4
+ children?: any;
5
+ title?: string;
6
+ note?: string;
7
+ className?: string;
8
+ }
9
+
10
+ export const EmptyData = ({ children, title, note, className }: EmptyDataProps) => {
11
+ return (
12
+ <Container className={className}>
13
+ {!!title && <h2>{title}</h2>}
14
+ {!!note && <p>{note}</p>}
15
+ {!!children && children}
16
+ </Container>
17
+ );
18
+ };
19
+
20
+ const Container = styled.div(
21
+ ({ theme }) => `
22
+ display: flex;
23
+ width: 100%;
24
+ min-width: 0;
25
+ flex-direction: column;
26
+ justify-content: center;
27
+ align-items: center;
28
+ gap: 10px;
29
+ h2,
30
+ p {
31
+ padding: 0;
32
+ margin: 0;
33
+ text-align: center;
34
+ color: ${theme.colors.text.light};
35
+ }
36
+ h2 {
37
+ font-size: ${theme.typography.variants.h2.fontSize};
38
+ font-weight: 600;
39
+ }
40
+ p {
41
+ font-size: ${theme.typography.variants.h3.fontSize};
42
+ }
43
+ `
44
+ );
@@ -0,0 +1 @@
1
+ export * from './EmptyData';
@@ -1,5 +1,5 @@
1
1
  import styled from 'styled-components';
2
- import { CSSProperties, ElementType, ReactNode } from 'react';
2
+ import { CSSProperties, ElementType } from 'react';
3
3
  import { ColorVariant, createComponent, FabricComponent, TypographyVariant } from '../../Theme';
4
4
  import { resolveThemeColor } from '../../Theme/utils';
5
5
 
@@ -40,6 +40,7 @@ export const Typography = ({
40
40
  color,
41
41
  className,
42
42
  style,
43
+ ...props
43
44
  }: TypographyProps) => {
44
45
  // Determine which HTML element to render based on the variant if not explicitly specified
45
46
  const Element = element || (variant.startsWith('h') ? variant : 'p');
@@ -53,6 +54,7 @@ export const Typography = ({
53
54
  $color={color}
54
55
  className={className}
55
56
  style={style}
57
+ {...props}
56
58
  >
57
59
  {children}
58
60
  </StyledTypography>
package/src/Core/index.ts CHANGED
@@ -13,3 +13,4 @@ export * from './Input';
13
13
  export * from './Flex';
14
14
  export * from './Box';
15
15
  export * from './Line';
16
+ export * from './EmptyData';