@selfdecode/sd-component-library 2.44.5 → 2.44.7

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,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { BoxProps } from "rebass";
2
3
  /**
3
4
  * Type for the refsMap to be stored in reference manager.
4
5
  */
@@ -8,7 +9,7 @@ export declare type refsMap = {
8
9
  /**
9
10
  * Interface for Anchor props.
10
11
  */
11
- export interface AnchorProps {
12
+ export interface AnchorProps extends BoxProps {
12
13
  /**
13
14
  * Hash id of the component.
14
15
  */
@@ -30,4 +31,8 @@ export interface AnchorProps {
30
31
  * Children of Anchor component.
31
32
  */
32
33
  children: React.ReactNode;
34
+ /**
35
+ * Scroll behavior for the anchor.
36
+ */
37
+ scrollBehavior?: "auto" | "smooth";
33
38
  }
@@ -27,8 +27,9 @@ declare class RefsManager {
27
27
  * Scroll the component with provided ID into the view.
28
28
  *
29
29
  * @param id ID for the component.
30
+ * @param behavior Scroll behavior.
30
31
  */
31
- scrollToRef(id: string): void;
32
+ scrollToRef(id: string, behavior?: "smooth" | "auto"): void;
32
33
  }
33
34
  export declare const refsManager: RefsManager;
34
35
  export {};