Skip to content

Commit

Permalink
feat(types): missing and new option for slider
Browse files Browse the repository at this point in the history
  • Loading branch information
lubber-de committed Oct 25, 2024
1 parent 1a22e32 commit 6c2106d
Showing 1 changed file with 54 additions and 2 deletions.
56 changes: 54 additions & 2 deletions types/fomantic-ui-slider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ declare namespace FomanticUI {
*/
end: number;

/**
* Makes sure that the two thumbs of a range slider always need to have a difference of the given value.
* @default false
*/
minRange: false | number;

/**
* Makes sure that the two thumbs of a range slider don't exceed a difference of the given value.
* @default false
*/
maxRange: false | number;

/**
* The type of label to display for a labeled slider.
* Can be 'number' or 'letter'.
Expand All @@ -91,11 +103,41 @@ declare namespace FomanticUI {
*/
interpretLabel: false | ((value: any) => string);

/**
* String or array of strings to be used for labelType 'letter'
* @default 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
*/
letters: string | string[],

/**
* An array of label values which restrict the displayed labels to only those which are defined
* @default []
*/
restrictedLabels: number[];

/**
* If the selected range labels should be highlighted
* @default false
*/
highlightRange: boolean;

/**
* Whether a tooltip should be shown to the thumb(s) on hover. Will contain the current slider value.
* @default false
*/
showThumbTooltip: boolean;

/**
* Tooltip configuration used when showThumbTooltip is true
* @default false
*/
tooltipConfig: object;

/**
* Show ticks on a labeled slider.
* @default false
*/
showLabelTicks: boolean;
showLabelTicks: boolean | 'always';

/**
* Define smoothness when the slider is moving.
Expand All @@ -107,7 +149,7 @@ declare namespace FomanticUI {
* Whether labels should auto adjust on window resize.
* @default true
*/
autoAdjustLabels: boolean;
autoAdjustLabels: boolean | 'fixed';

/**
* The distance between labels.
Expand Down Expand Up @@ -254,6 +296,16 @@ declare namespace FomanticUI {
* @default 'smooth'
*/
smooth: string;

/**
* @default 'label'
*/
label: string;

/**
* @default 'active'
*/
active: string;
}

interface Metadatas {
Expand Down

0 comments on commit 6c2106d

Please sign in to comment.