@protonradio/proton-ui 0.7.21 → 0.8.1

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/index.d.ts CHANGED
@@ -211,7 +211,7 @@ declare const BRAND: {
211
211
  * A customizable button component that can render as either a button or anchor element
212
212
  * @interface ButtonProps
213
213
  */
214
- export declare function Button({ variant, href, onPress, type, isDisabled, "data-testid": testId, children, }: ButtonProps): JSX_2.Element;
214
+ export declare function Button({ variant, to, target, onPress, type, isDisabled, "data-testid": testId, children, }: ButtonProps): JSX_2.Element;
215
215
 
216
216
  export declare function ButtonGroup(props: ButtonGroupProps): JSX_2.Element;
217
217
 
@@ -260,10 +260,14 @@ declare interface ButtonProps {
260
260
  * @param {boolean} isDisabled
261
261
  */
262
262
  isDisabled?: boolean;
263
- /** The URL that the button should link to. Turns the element into an `a` tag
264
- * @param {string} href
263
+ /** The URL that the button should link to. Turns the element into an `a` tag. If the URL is external, you should pass the entire URL to the `to` prop (e.g. `https://example.com`).
264
+ * @param {string} to
265
265
  */
266
- href?: string;
266
+ to?: string;
267
+ /** The target attribute for the link. Defaults to `_blank` if the URL is external.
268
+ * @param {string} target
269
+ */
270
+ target?: "_blank" | "_self" | "_parent" | "_top";
267
271
  /** Called when the button is pressed (on release, not keydown)
268
272
  * @param {(e: PressEvent) => void} onPress
269
273
  */