Skip to content

Commit

Permalink
Merge pull request #3 from lara-zeus/adds
Browse files Browse the repository at this point in the history
add option for tooltips
  • Loading branch information
sawirricardo authored Oct 12, 2023
2 parents e93a789 + a2541a6 commit 8d8cf2b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Forms/Nouislider.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class Nouislider extends Field implements Contracts\HasAffixActions
*/
protected $minValue = null;

protected bool | Closure | null $tooltips = false;

/**
* @var view-string
*/
Expand Down Expand Up @@ -130,6 +132,13 @@ public function minValue($value): static
return $this;
}

public function tooltips($value = true): static
{
$this->tooltips = $value;

return $this;
}

public function orientation($value)
{
$this->orientation = $value;
Expand Down Expand Up @@ -163,6 +172,11 @@ public function getMinValue()
return $this->evaluate($this->minValue);
}

public function getTooltips()
{
return $this->evaluate($this->tooltips);
}

public function getSnap()
{
return $this->evaluate($this->snap);
Expand Down Expand Up @@ -260,6 +274,7 @@ public function getOptions()
'animate' => $this->getAnimate(),
'animationDuration' => $this->getAnimationDuration(),
'cssPrefix' => $this->getCssPrefix(),
'tooltips' => $this->getTooltips(),
];
}
}

0 comments on commit 8d8cf2b

Please sign in to comment.