@alto-avios/alto-ui 1.2.0 → 1.2.1-alpha.2

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,10 +1,11 @@
1
+ import { ElementType } from 'react';
1
2
  import { AriaButtonProps, PressEvent } from 'react-aria';
2
3
  export type NewButtonSize = 'lg' | 'md' | 'sm';
3
- export interface NewButtonProps extends AriaButtonProps<'button'> {
4
+ export interface NewButtonProps<T extends ElementType> extends AriaButtonProps<T> {
4
5
  /**
5
6
  * The HTML element to be rendered as the button.
6
7
  */
7
- as?: 'button' | 'a';
8
+ as?: 'button' | 'a' | T;
8
9
  /**
9
10
  * What the base style of button is
10
11
  * @default 'accent'
@@ -77,5 +78,5 @@ export interface NewButtonProps extends AriaButtonProps<'button'> {
77
78
  */
78
79
  focusStyle?: 'default' | 'white';
79
80
  }
80
- export declare const NewButton: ({ as, styleType, emphasis, size, hasLeadingIcon, leadingIconName, hasTrailingIcon, trailingIconName, isDisabled, href, target, children, fullWidth, onClick, focusStyle, ...props }: NewButtonProps) => import("react/jsx-runtime").JSX.Element;
81
+ export declare const NewButton: <T extends ElementType = "button">({ as, styleType, emphasis, size, hasLeadingIcon, leadingIconName, hasTrailingIcon, trailingIconName, isDisabled, href, target, children, fullWidth, onClick, focusStyle, ...props }: NewButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
81
82
  export default NewButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alto-avios/alto-ui",
3
- "version": "1.2.0",
3
+ "version": "1.2.1-alpha.2",
4
4
  "description": "A react component library for Alto Design System",
5
5
  "author": "Ian Caldwell IAGL",
6
6
  "license": "MIT",