@equisoft/design-elements-react 5.2.5-snapshot.20230505145145 → 5.2.5-snapshot.20230508155519
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.
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { FlattenInterpolation, ThemeProps } from 'styled-components';
|
|
3
3
|
import { Theme } from '../../themes';
|
|
4
|
+
type Size = 'small' | 'medium';
|
|
4
5
|
export declare const defaultButtonStyles: FlattenInterpolation<import("styled-components").ThemedStyledProps<{
|
|
5
6
|
isMobile: boolean;
|
|
7
|
+
size?: Size | undefined;
|
|
6
8
|
}, import("styled-components").DefaultTheme>>;
|
|
7
9
|
interface AbstractButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
10
|
isMobile: boolean;
|
|
11
|
+
size?: Size;
|
|
9
12
|
}
|
|
10
13
|
export declare const AbstractButton: import("react").ForwardRefExoticComponent<AbstractButtonProps & {
|
|
11
14
|
children?: import("react").ReactNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { KeyboardEvent, MouseEvent } from 'react';
|
|
2
2
|
export type ButtonType = 'primary' | 'secondary' | 'tertiary' | 'destructive';
|
|
3
|
+
type Size = 'small' | 'medium';
|
|
3
4
|
type Type = 'submit' | 'button' | 'reset';
|
|
4
5
|
interface ButtonProps {
|
|
5
6
|
autofocus?: boolean;
|
|
@@ -12,6 +13,11 @@ interface ButtonProps {
|
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
inverted?: boolean;
|
|
14
15
|
label?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Size variant
|
|
18
|
+
* @default medium
|
|
19
|
+
*/
|
|
20
|
+
size?: Size;
|
|
15
21
|
title?: string;
|
|
16
22
|
type?: Type;
|
|
17
23
|
onClick?(event: MouseEvent<HTMLButtonElement>): void;
|
|
@@ -2,6 +2,7 @@ import { KeyboardEvent, MouseEvent, ReactElement } from 'react';
|
|
|
2
2
|
import { AvatarProps } from '../avatar/avatar';
|
|
3
3
|
import { IconName, IconProps } from '../icon/icon';
|
|
4
4
|
type ButtonType = 'primary' | 'secondary' | 'tertiary' | 'destructive';
|
|
5
|
+
type Size = 'small' | 'medium';
|
|
5
6
|
type Type = 'submit' | 'button' | 'reset';
|
|
6
7
|
export interface IconButtonProps {
|
|
7
8
|
autofocus?: boolean;
|
|
@@ -22,6 +23,11 @@ export interface IconButtonProps {
|
|
|
22
23
|
* Sets aria-label
|
|
23
24
|
*/
|
|
24
25
|
label?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Size variant
|
|
28
|
+
* @default medium
|
|
29
|
+
*/
|
|
30
|
+
size?: Size;
|
|
25
31
|
title?: string;
|
|
26
32
|
type?: Type;
|
|
27
33
|
onClick?(event: MouseEvent<HTMLButtonElement>): void;
|
package/package.json
CHANGED