@sb1/ffe-cards-react 10.0.3 → 10.0.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 (2) hide show
  1. package/package.json +3 -3
  2. package/types/index.d.ts +16 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-cards-react",
3
- "version": "10.0.3",
3
+ "version": "10.0.4",
4
4
  "description": "React implementation of ffe-react",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -25,7 +25,7 @@
25
25
  "test:watch": "ffe-buildtool jest --watch"
26
26
  },
27
27
  "dependencies": {
28
- "@sb1/ffe-cards": "^15.0.2",
28
+ "@sb1/ffe-cards": "^15.0.3",
29
29
  "prop-types": "^15.7.2"
30
30
  },
31
31
  "devDependencies": {
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "8cbf828bcc67fe4a402abfca9a133061e3d2c37e"
43
+ "gitHead": "1ab898e744977e4cb4db1bee9b65369a0deeef9a"
44
44
  }
package/types/index.d.ts CHANGED
@@ -1,27 +1,25 @@
1
1
  import * as React from 'react';
2
2
 
3
- export interface ComponentBaseProps
4
- extends React.HtmlHTMLAttributes<
5
- HTMLElement | HTMLButtonElement | HTMLAnchorElement
6
- > {
7
- className?: string;
8
- element?: HTMLElement | string | React.ElementType;
9
- children?: React.ReactNode;
10
- }
11
-
12
- export interface CardBaseProps extends ComponentBaseProps {
3
+ type ComponentBaseProps =
4
+ | ({
5
+ className?: string;
6
+ element?: HTMLElement | string | React.ElementType;
7
+ children?: React.ReactNode;
8
+ } & React.ComponentProps<'html'>)
9
+ | React.ComponentProps<'button'>
10
+ | React.ComponentProps<'a'>;
11
+
12
+ type CardBaseProps = {
13
13
  to?: string;
14
- }
14
+ } & ComponentBaseProps;
15
15
 
16
- export interface TitleProps extends ComponentBaseProps {
16
+ type TitleProps = {
17
17
  overflowEllipsis?: boolean;
18
- }
19
-
20
- export interface SubtextProps extends ComponentBaseProps {}
21
-
22
- export interface TextProps extends ComponentBaseProps {}
18
+ } & ComponentBaseProps;
23
19
 
24
- export interface CardNameProps extends ComponentBaseProps {}
20
+ type SubtextProps = ComponentBaseProps;
21
+ type TextProps = ComponentBaseProps;
22
+ type CardNameProps = ComponentBaseProps;
25
23
 
26
24
  export interface CardRenderProps {
27
25
  CardName: React.FC<CardNameProps>;