mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
anchor-js: fix and update anchor options (#41544)
https://www.bryanbraun.com/anchorjs/#options https://github.com/bryanbraun/anchorjs/releases/tag/4.2.0
This commit is contained in:
committed by
Eli Barzilay
parent
95f67429c6
commit
98169480bc
@@ -14,3 +14,12 @@ const footerAnchors = new AnchorJS({
|
||||
placement: 'right',
|
||||
});
|
||||
footerAnchors.remove('.links');
|
||||
|
||||
anchors.options = {
|
||||
placement: 'left',
|
||||
visible: 'always',
|
||||
icon: '¶'
|
||||
};
|
||||
|
||||
anchors.options.base = '/2019/1/03/my-post';
|
||||
anchors.options.titleText = 'Click to directly link to this section.';
|
||||
|
||||
Vendored
+5
-3
@@ -1,4 +1,4 @@
|
||||
// Type definitions for anchor-js 4.1
|
||||
// Type definitions for anchor-js 4.2
|
||||
// Project: https://github.com/bryanbraun/anchorjs
|
||||
// Definitions by: Brian Surowiec <https://github.com/xt0rted>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -16,10 +16,12 @@ declare namespace anchorjs {
|
||||
type AnchorVisibility = 'always' | 'hover' | 'touch';
|
||||
|
||||
interface AnchorOptions {
|
||||
arialabel?: string;
|
||||
ariaLabel?: string;
|
||||
base?: string;
|
||||
class?: string;
|
||||
icons?: string;
|
||||
icon?: string;
|
||||
placement?: AnchorPlacement;
|
||||
titleText?: string;
|
||||
truncate?: number;
|
||||
visible?: AnchorVisibility;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user