@oaknational/oak-components 2.31.0 → 2.32.0
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/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/types.d.ts +16 -3
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -3445,6 +3445,9 @@ type OakHoverLinkComponent = <C extends React__default.ElementType = "a">(props:
|
|
|
3445
3445
|
displayDisabled?: boolean;
|
|
3446
3446
|
} & PolymorphicPropsWithRef<C> & OakHoverLinkProps) => React__default.ReactNode;
|
|
3447
3447
|
/**
|
|
3448
|
+
* deprecated - use `<OakLink />` instead
|
|
3449
|
+
* @deprecated
|
|
3450
|
+
*
|
|
3448
3451
|
* A link with an optional icon where underline is shown on hover.
|
|
3449
3452
|
*
|
|
3450
3453
|
* Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.
|
|
@@ -3453,16 +3456,23 @@ type OakHoverLinkComponent = <C extends React__default.ElementType = "a">(props:
|
|
|
3453
3456
|
*/
|
|
3454
3457
|
declare const OakHoverLink: OakHoverLinkComponent;
|
|
3455
3458
|
|
|
3459
|
+
type Variant = "primary" | "secondary";
|
|
3460
|
+
|
|
3456
3461
|
type OakLinkProps = Pick<InternalLinkProps, "iconName" | "isTrailingIcon" | "isLoading"> & {
|
|
3457
3462
|
iconWidth?: OakAllSpacingToken;
|
|
3458
3463
|
iconHeight?: OakAllSpacingToken;
|
|
3459
|
-
|
|
3464
|
+
/**
|
|
3465
|
+
* Style variant of the OakLink component: "primary" | "secondary"
|
|
3466
|
+
*
|
|
3467
|
+
* @default "primary"
|
|
3468
|
+
*/
|
|
3469
|
+
variant?: Variant;
|
|
3470
|
+
} & Pick<TypographyStyleProps, "$font">;
|
|
3460
3471
|
type OakLinkComponent$1 = <C extends React__default.ElementType = "a">(props: PolymorphicPropsWithRef<C> & OakLinkProps) => React__default.ReactNode;
|
|
3461
3472
|
/**
|
|
3462
|
-
* A
|
|
3473
|
+
* A link with an optional icon and loading state.
|
|
3463
3474
|
*
|
|
3464
3475
|
* Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.
|
|
3465
|
-
* ą
|
|
3466
3476
|
*/
|
|
3467
3477
|
declare const OakLink: OakLinkComponent$1;
|
|
3468
3478
|
|
|
@@ -3511,6 +3521,9 @@ type OakSecondaryLinkProps = {
|
|
|
3511
3521
|
} & Pick<InternalLinkProps, "iconName" | "isTrailingIcon" | "isLoading">;
|
|
3512
3522
|
type OakLinkComponent = <C extends React__default.ElementType = "a">(props: PolymorphicPropsWithRef<C> & OakSecondaryLinkProps) => React__default.ReactNode;
|
|
3513
3523
|
/**
|
|
3524
|
+
* deprecated - use `<OakLink variant="secondary"/>` instead
|
|
3525
|
+
* @deprecated
|
|
3526
|
+
*
|
|
3514
3527
|
* A black link with an optional icon and loading state.
|
|
3515
3528
|
*
|
|
3516
3529
|
* Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.
|