@protonradio/proton-ui 0.5.2 → 0.5.3
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/dist/proton-ui.es.d.ts +22 -11
- package/dist/proton-ui.es.js +164 -154
- package/dist/proton-ui.es.js.map +1 -1
- package/dist/proton-ui.umd.js +1 -1
- package/dist/proton-ui.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/proton-ui.es.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ export declare const BRAND: {
|
|
|
111
111
|
SECONDARY: string;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
export declare function Button({ variant,
|
|
114
|
+
export declare function Button({ variant, href, onPress, type, isDisabled, dataTestId, children, }: ButtonProps): JSX_2.Element;
|
|
115
115
|
|
|
116
116
|
export declare function ButtonGroup(props: ButtonGroupProps): JSX_2.Element;
|
|
117
117
|
|
|
@@ -151,25 +151,36 @@ declare interface ButtonGroupProps {
|
|
|
151
151
|
children?: React.ReactNode;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
/** Properties for the Button component
|
|
155
|
+
* @interface ButtonProps
|
|
156
|
+
*/
|
|
154
157
|
declare interface ButtonProps {
|
|
155
|
-
/**
|
|
156
|
-
*
|
|
158
|
+
/** The button's visual aesthetic
|
|
159
|
+
* @param {ButtonVariant} variant
|
|
157
160
|
*/
|
|
158
161
|
variant?: ButtonVariant;
|
|
159
|
-
/**
|
|
160
|
-
*
|
|
162
|
+
/** Should the button be non-interactive?
|
|
163
|
+
* @param {boolean} isDisabled
|
|
161
164
|
*/
|
|
162
165
|
isDisabled?: boolean;
|
|
163
|
-
/**
|
|
164
|
-
*
|
|
166
|
+
/** The URL that the button should link to. Turns the element into an `a` tag
|
|
167
|
+
* @param {string} href
|
|
165
168
|
*/
|
|
166
169
|
href?: string;
|
|
167
|
-
/**
|
|
168
|
-
*
|
|
170
|
+
/** Called when the button is pressed (on release, not keydown)
|
|
171
|
+
* @param {(e: PressEvent) => void} onPress
|
|
169
172
|
*/
|
|
170
173
|
onPress?: (e: PressEvent) => void;
|
|
171
|
-
/**
|
|
172
|
-
*
|
|
174
|
+
/** The type of button
|
|
175
|
+
* @param {"button" | "submit" | "reset"} type
|
|
176
|
+
*/
|
|
177
|
+
type?: "button" | "submit" | "reset";
|
|
178
|
+
/** The test ID for the button
|
|
179
|
+
* @param {string} dataTestId
|
|
180
|
+
*/
|
|
181
|
+
dataTestId?: string;
|
|
182
|
+
/** The content to display within the button
|
|
183
|
+
* @param {React.ReactNode} children
|
|
173
184
|
*/
|
|
174
185
|
children?: React.ReactNode;
|
|
175
186
|
}
|