@propellerads/empty-state 2.1.1 → 3.0.0

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/README.md CHANGED
@@ -7,13 +7,19 @@
7
7
  [Github](https://github.com/propellerads/ui-components/tree/master/Components/EmptyState)
8
8
 
9
9
  ## Installation
10
- * `yarn add @propellerads/empty-state` or `npm install @propellerads/empty-state -S`
10
+
11
+ - `yarn add @propellerads/empty-state` or `npm install @propellerads/empty-state -S`
11
12
 
12
13
  ### How to use
13
- * `import EmptyState from '@propellerads/empty-state';`
14
- * And render ```<EmptyState
15
- icon={<Send color="blue" />}
16
- description={<Title>No payouts here yet</Title>}
17
- title="You’ll see regular payouts here as soon as you start working with us!"
18
- actions={<button>Button</button>}
19
- />```
14
+
15
+ - `import EmptyState from '@propellerads/empty-state';`
16
+ - And render
17
+
18
+ ```
19
+ <EmptyState
20
+ icon={<Send color="blue" />}
21
+ description={<Title>No payouts here yet</Title>}
22
+ title="You’ll see regular payouts here as soon as you start working with us!"
23
+ actions={<button>Button</button>}
24
+ />
25
+ ```
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.cjs.development.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {\n StyledEmptyState,\n StyledEmptyStateIcon,\n StyledEmptyStateDescription,\n StyledEmptyStateActions,\n};\n","import React from 'react';\n\nimport {EmptyStateProps} from \"./types\";\nimport {\n StyledEmptyState,\n StyledEmptyStateIcon,\n StyledEmptyStateDescription,\n StyledEmptyStateActions,\n} from './style';\n\nconst EmptyState = ({\n icon = undefined,\n title,\n description = '',\n actions = '',\n }: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && (\n <StyledEmptyStateIcon>\n {icon}\n </StyledEmptyStateIcon>\n )}\n {title}\n {description && (\n <StyledEmptyStateDescription>\n {description}\n </StyledEmptyStateDescription>\n )}\n {actions && (\n <StyledEmptyStateActions>\n {actions}\n </StyledEmptyStateActions>\n )}\n </StyledEmptyState>\n);\n\nexport default EmptyState\n"],"names":["StyledEmptyState","styled","div","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","EmptyState","icon","undefined","title","description","actions","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,gBAAgB,gBAAGC,MAAM,CAACC,GAAV,kCAKPC,sBAAO,GAAG,CALH,CAAtB;AAQA,IAAMC,oBAAoB,gBAAGH,MAAM,CAACC,GAAV,mCACPC,sBAAO,GAAG,CADH,CAA1B;AAIA,IAAME,2BAA2B,gBAAGJ,MAAM,CAACC,GAAV,mCACdC,sBAAO,GAAG,CADI,CAAjC;AAIA,IAAMG,uBAAuB,gBAAGL,MAAM,CAACC,GAAV,mCACbC,sBAAO,GAAG,CADG,CAA7B;;ACTA,IAAMI,UAAU,GAAG,SAAbA,UAAa;AAAA,uBACXC,IADW;AAAA,MACXA,IADW,0BACJC,SADI;AAAA,MAEXC,KAFW,QAEXA,KAFW;AAAA,8BAGXC,WAHW;AAAA,MAGXA,WAHW,iCAGG,EAHH;AAAA,0BAIXC,OAJW;AAAA,MAIXA,OAJW,6BAID,EAJC;AAAA,SAMfC,mBAAA,CAACb,gBAAD,MAAA,EACKQ,IAAI,IACDK,mBAAA,CAACT,oBAAD,MAAA,EACKI,IADL,CAFR,EAMKE,KANL,EAOKC,WAAW,IACRE,mBAAA,CAACR,2BAAD,MAAA,EACKM,WADL,CARR,EAYKC,OAAO,IACJC,mBAAA,CAACP,uBAAD,MAAA,EACKM,OADL,CAbR,CANe;AAAA,CAAnB;;;;"}
1
+ {"version":3,"file":"empty-state.cjs.development.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};\n","import React from 'react';\n\nimport {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}\n {title}\n {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}\n {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}\n </StyledEmptyState>\n);\n\nexport default EmptyState;\n"],"names":["StyledEmptyState","styled","div","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","EmptyState","icon","undefined","title","description","actions","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,gBAAgB,gBAAGC,MAAM,CAACC,GAAV,kCAKPC,sBAAO,GAAG,CALH,CAAtB;AAQA,IAAMC,oBAAoB,gBAAGH,MAAM,CAACC,GAAV,mCACPC,sBAAO,GAAG,CADH,CAA1B;AAIA,IAAME,2BAA2B,gBAAGJ,MAAM,CAACC,GAAV,mCACdC,sBAAO,GAAG,CADI,CAAjC;AAIA,IAAMG,uBAAuB,gBAAGL,MAAM,CAACC,GAAV,mCACbC,sBAAO,GAAG,CADG,CAA7B;;ACdA,IAAMI,UAAU,GAAG,SAAbA,UAAa;AAAA,uBAAEC,IAAF;AAAA,MAAEA,IAAF,0BAASC,SAAT;AAAA,MAAoBC,KAApB,QAAoBA,KAApB;AAAA,8BAA2BC,WAA3B;AAAA,MAA2BA,WAA3B,iCAAyC,EAAzC;AAAA,0BAA6CC,OAA7C;AAAA,MAA6CA,OAA7C,6BAAuD,EAAvD;AAAA,SACjBC,mBAAA,CAACb,gBAAD,MAAA,EACGQ,IAAI,IAAIK,mBAAA,CAACT,oBAAD,MAAA,EAAuBI,IAAvB,CADX,EAEGE,KAFH,EAGGC,WAAW,IAAIE,mBAAA,CAACR,2BAAD,MAAA,EAA8BM,WAA9B,CAHlB,EAIGC,OAAO,IAAIC,mBAAA,CAACP,uBAAD,MAAA,EAA0BM,OAA1B,CAJd,CADiB;AAAA,CAAnB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.cjs.production.min.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {\n StyledEmptyState,\n StyledEmptyStateIcon,\n StyledEmptyStateDescription,\n StyledEmptyStateActions,\n};\n","import React from 'react';\n\nimport {EmptyStateProps} from \"./types\";\nimport {\n StyledEmptyState,\n StyledEmptyStateIcon,\n StyledEmptyStateDescription,\n StyledEmptyStateActions,\n} from './style';\n\nconst EmptyState = ({\n icon = undefined,\n title,\n description = '',\n actions = '',\n }: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && (\n <StyledEmptyStateIcon>\n {icon}\n </StyledEmptyStateIcon>\n )}\n {title}\n {description && (\n <StyledEmptyStateDescription>\n {description}\n </StyledEmptyStateDescription>\n )}\n {actions && (\n <StyledEmptyStateActions>\n {actions}\n </StyledEmptyStateActions>\n )}\n </StyledEmptyState>\n);\n\nexport default EmptyState\n"],"names":["StyledEmptyState","styled","div","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","icon","undefined","title","description","actions","React"],"mappings":"qtBAGA,IAAMA,EAAmBC,EAAOC,QAKP,EAAVC,WAGTC,EAAuBH,EAAOC,QACP,EAAVC,WAGbE,EAA8BJ,EAAOC,QACd,EAAVC,WAGbG,EAA0BL,EAAOC,QACb,EAAVC,2BCVG,oBACXI,KAAAA,kBAAOC,IACPC,IAAAA,UACAC,YAAAA,aAAc,SACdC,QAAAA,aAAU,YAEdC,gBAACZ,OACIO,GACGK,gBAACR,OACIG,GAGRE,EACAC,GACGE,gBAACP,OACIK,GAGRC,GACGC,gBAACN,OACIK"}
1
+ {"version":3,"file":"empty-state.cjs.production.min.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};\n","import React from 'react';\n\nimport {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}\n {title}\n {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}\n {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}\n </StyledEmptyState>\n);\n\nexport default EmptyState;\n"],"names":["StyledEmptyState","styled","div","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","icon","undefined","title","description","actions","React"],"mappings":"qtBAGA,IAAMA,EAAmBC,EAAOC,QAKP,EAAVC,WAGTC,EAAuBH,EAAOC,QACP,EAAVC,WAGbE,EAA8BJ,EAAOC,QACd,EAAVC,WAGbG,EAA0BL,EAAOC,QACb,EAAVC,2BCfG,oBAAEI,KAAAA,kBAAOC,IAAWC,IAAAA,UAAOC,YAAAA,aAAc,SAAIC,QAAAA,aAAU,YACxEC,gBAACZ,OACEO,GAAQK,gBAACR,OAAsBG,GAC/BE,EACAC,GAAeE,gBAACP,OAA6BK,GAC7CC,GAAWC,gBAACN,OAAyBK"}
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.esm.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {\n StyledEmptyState,\n StyledEmptyStateIcon,\n StyledEmptyStateDescription,\n StyledEmptyStateActions,\n};\n","import React from 'react';\n\nimport {EmptyStateProps} from \"./types\";\nimport {\n StyledEmptyState,\n StyledEmptyStateIcon,\n StyledEmptyStateDescription,\n StyledEmptyStateActions,\n} from './style';\n\nconst EmptyState = ({\n icon = undefined,\n title,\n description = '',\n actions = '',\n }: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && (\n <StyledEmptyStateIcon>\n {icon}\n </StyledEmptyStateIcon>\n )}\n {title}\n {description && (\n <StyledEmptyStateDescription>\n {description}\n </StyledEmptyStateDescription>\n )}\n {actions && (\n <StyledEmptyStateActions>\n {actions}\n </StyledEmptyStateActions>\n )}\n </StyledEmptyState>\n);\n\nexport default EmptyState\n"],"names":["StyledEmptyState","styled","div","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","EmptyState","icon","undefined","title","description","actions","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,gBAAgB,gBAAGC,MAAM,CAACC,GAAV,kCAKPC,OAAO,GAAG,CALH,CAAtB;AAQA,IAAMC,oBAAoB,gBAAGH,MAAM,CAACC,GAAV,mCACPC,OAAO,GAAG,CADH,CAA1B;AAIA,IAAME,2BAA2B,gBAAGJ,MAAM,CAACC,GAAV,mCACdC,OAAO,GAAG,CADI,CAAjC;AAIA,IAAMG,uBAAuB,gBAAGL,MAAM,CAACC,GAAV,mCACbC,OAAO,GAAG,CADG,CAA7B;;ACTA,IAAMI,UAAU,GAAG,SAAbA,UAAa;AAAA,uBACXC,IADW;AAAA,MACXA,IADW,0BACJC,SADI;AAAA,MAEXC,KAFW,QAEXA,KAFW;AAAA,8BAGXC,WAHW;AAAA,MAGXA,WAHW,iCAGG,EAHH;AAAA,0BAIXC,OAJW;AAAA,MAIXA,OAJW,6BAID,EAJC;AAAA,SAMfC,mBAAA,CAACb,gBAAD,MAAA,EACKQ,IAAI,IACDK,mBAAA,CAACT,oBAAD,MAAA,EACKI,IADL,CAFR,EAMKE,KANL,EAOKC,WAAW,IACRE,mBAAA,CAACR,2BAAD,MAAA,EACKM,WADL,CARR,EAYKC,OAAO,IACJC,mBAAA,CAACP,uBAAD,MAAA,EACKM,OADL,CAbR,CANe;AAAA,CAAnB;;;;"}
1
+ {"version":3,"file":"empty-state.esm.js","sources":["../src/style.tsx","../src/index.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport {spacing} from '@propellerads/stylevariables';\n\nconst StyledEmptyState = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 0 ${spacing * 5}px;\n`;\n\nconst StyledEmptyStateIcon = styled.div`\n margin-bottom: ${spacing * 9}px;\n`;\n\nconst StyledEmptyStateDescription = styled.div`\n margin-bottom: ${spacing * 4}px;\n`;\n\nconst StyledEmptyStateActions = styled.div`\n margin-top: ${spacing * 5}px;\n`;\n\nexport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};\n","import React from 'react';\n\nimport {EmptyStateProps} from './types';\nimport {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';\n\nconst EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (\n <StyledEmptyState>\n {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}\n {title}\n {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}\n {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}\n </StyledEmptyState>\n);\n\nexport default EmptyState;\n"],"names":["StyledEmptyState","styled","div","spacing","StyledEmptyStateIcon","StyledEmptyStateDescription","StyledEmptyStateActions","EmptyState","icon","undefined","title","description","actions","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,gBAAgB,gBAAGC,MAAM,CAACC,GAAV,kCAKPC,OAAO,GAAG,CALH,CAAtB;AAQA,IAAMC,oBAAoB,gBAAGH,MAAM,CAACC,GAAV,mCACPC,OAAO,GAAG,CADH,CAA1B;AAIA,IAAME,2BAA2B,gBAAGJ,MAAM,CAACC,GAAV,mCACdC,OAAO,GAAG,CADI,CAAjC;AAIA,IAAMG,uBAAuB,gBAAGL,MAAM,CAACC,GAAV,mCACbC,OAAO,GAAG,CADG,CAA7B;;ACdA,IAAMI,UAAU,GAAG,SAAbA,UAAa;AAAA,uBAAEC,IAAF;AAAA,MAAEA,IAAF,0BAASC,SAAT;AAAA,MAAoBC,KAApB,QAAoBA,KAApB;AAAA,8BAA2BC,WAA3B;AAAA,MAA2BA,WAA3B,iCAAyC,EAAzC;AAAA,0BAA6CC,OAA7C;AAAA,MAA6CA,OAA7C,6BAAuD,EAAvD;AAAA,SACjBC,mBAAA,CAACb,gBAAD,MAAA,EACGQ,IAAI,IAAIK,mBAAA,CAACT,oBAAD,MAAA,EAAuBI,IAAvB,CADX,EAEGE,KAFH,EAGGC,WAAW,IAAIE,mBAAA,CAACR,2BAAD,MAAA,EAA8BM,WAA9B,CAHlB,EAIGC,OAAO,IAAIC,mBAAA,CAACP,uBAAD,MAAA,EAA0BM,OAA1B,CAJd,CADiB;AAAA,CAAnB;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- import { EmptyStateProps } from "./types";
2
- declare const EmptyState: ({ icon, title, description, actions, }: EmptyStateProps) => JSX.Element;
1
+ import React from 'react';
2
+ import { EmptyStateProps } from './types';
3
+ declare const EmptyState: ({ icon, title, description, actions }: EmptyStateProps) => React.JSX.Element;
3
4
  export default EmptyState;
package/dist/style.d.ts CHANGED
@@ -2,4 +2,4 @@ declare const StyledEmptyState: import("styled-components").StyledComponent<"div
2
2
  declare const StyledEmptyStateIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  declare const StyledEmptyStateDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  declare const StyledEmptyStateActions: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export { StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions, };
5
+ export { StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions };
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export interface EmptyStateProps {
3
3
  title: React.ReactChildren | string | React.ComponentElement<any, any>;
4
4
  icon?: React.ComponentElement<any, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@propellerads/empty-state",
3
- "version": "2.1.1",
3
+ "version": "3.0.0",
4
4
  "repository": "https://github.com/propellerads/ui-components",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -20,22 +20,18 @@
20
20
  "build": "tsdx build"
21
21
  },
22
22
  "peerDependencies": {
23
- "react": ">=16"
23
+ "react": ">=18 <19",
24
+ "styled-components": "5.1.1",
25
+ "@types/styled-components": "5.1.34"
24
26
  },
25
27
  "module": "dist/empty-state.esm.js",
26
28
  "devDependencies": {
27
- "@types/react": "^16.9.46",
28
- "@types/react-dom": "^16.9.8",
29
- "@types/styled-components": "^5.1.2",
30
- "react": "^16.13.1",
31
- "react-dom": "^16.13.1",
32
29
  "tsdx": "^0.13.2",
33
30
  "tslib": "^2.0.1",
34
- "typescript": "^3.9.7"
31
+ "typescript": "^4.9.5",
32
+ "@types/react": ">=18 <19"
35
33
  },
36
34
  "dependencies": {
37
- "@propellerads/stylevariables": "^1.3.0",
38
- "styled-components": "^5.1.1"
39
- },
40
- "gitHead": "fc7229037a81fad6786b945ad6b419ec6f4e39b7"
35
+ "@propellerads/stylevariables": "^1.3.0"
36
+ }
41
37
  }
package/src/index.tsx CHANGED
@@ -1,37 +1,15 @@
1
1
  import React from 'react';
2
2
 
3
- import {EmptyStateProps} from "./types";
4
- import {
5
- StyledEmptyState,
6
- StyledEmptyStateIcon,
7
- StyledEmptyStateDescription,
8
- StyledEmptyStateActions,
9
- } from './style';
3
+ import {EmptyStateProps} from './types';
4
+ import {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions} from './style';
10
5
 
11
- const EmptyState = ({
12
- icon = undefined,
13
- title,
14
- description = '',
15
- actions = '',
16
- }: EmptyStateProps) => (
17
- <StyledEmptyState>
18
- {icon && (
19
- <StyledEmptyStateIcon>
20
- {icon}
21
- </StyledEmptyStateIcon>
22
- )}
23
- {title}
24
- {description && (
25
- <StyledEmptyStateDescription>
26
- {description}
27
- </StyledEmptyStateDescription>
28
- )}
29
- {actions && (
30
- <StyledEmptyStateActions>
31
- {actions}
32
- </StyledEmptyStateActions>
33
- )}
34
- </StyledEmptyState>
6
+ const EmptyState = ({icon = undefined, title, description = '', actions = ''}: EmptyStateProps) => (
7
+ <StyledEmptyState>
8
+ {icon && <StyledEmptyStateIcon>{icon}</StyledEmptyStateIcon>}
9
+ {title}
10
+ {description && <StyledEmptyStateDescription>{description}</StyledEmptyStateDescription>}
11
+ {actions && <StyledEmptyStateActions>{actions}</StyledEmptyStateActions>}
12
+ </StyledEmptyState>
35
13
  );
36
14
 
37
- export default EmptyState
15
+ export default EmptyState;
package/src/style.tsx CHANGED
@@ -21,9 +21,4 @@ const StyledEmptyStateActions = styled.div`
21
21
  margin-top: ${spacing * 5}px;
22
22
  `;
23
23
 
24
- export {
25
- StyledEmptyState,
26
- StyledEmptyStateIcon,
27
- StyledEmptyStateDescription,
28
- StyledEmptyStateActions,
29
- };
24
+ export {StyledEmptyState, StyledEmptyStateIcon, StyledEmptyStateDescription, StyledEmptyStateActions};
package/src/types.ts CHANGED
@@ -1,10 +1,10 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
 
3
3
  export interface EmptyStateProps {
4
- title: React.ReactChildren | string | React.ComponentElement<any, any>
5
- icon?: React.ComponentElement<any, any>
6
- description: React.ReactChildren | string | React.ComponentElement<any, any>
7
- actions: React.ReactChildren | string | React.ComponentElement<any, any>
4
+ title: React.ReactChildren | string | React.ComponentElement<any, any>;
5
+ icon?: React.ComponentElement<any, any>;
6
+ description: React.ReactChildren | string | React.ComponentElement<any, any>;
7
+ actions: React.ReactChildren | string | React.ComponentElement<any, any>;
8
8
  }
9
9
 
10
10
  export default class EmptyState extends React.Component<EmptyStateProps> {}
package/CHANGELOG.md DELETED
@@ -1,15 +0,0 @@
1
- #### `2.1.0`
2
- * update dependencies
3
-
4
- #### `2.0.3`
5
-
6
- * Update `README.md`
7
-
8
- #### `2.0.2`
9
-
10
- * Added default export
11
-
12
- #### `2.0.0`
13
-
14
- * TS
15
- * Production build