chore(ComparisonSlider): add comments
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
<!--
|
||||||
|
Component: ControlsWrapper
|
||||||
|
Wrapper for the controls of the slider.
|
||||||
|
- Input to change the text
|
||||||
|
- Three combo controls with inputs and sliders for font-weight, font-size, and line-height
|
||||||
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { TypographyControl } from '$shared/lib';
|
import type { TypographyControl } from '$shared/lib';
|
||||||
import { Input } from '$shared/shadcn/ui/input';
|
import { Input } from '$shared/shadcn/ui/input';
|
||||||
@@ -8,13 +14,37 @@ import AArrowUP from '@lucide/svelte/icons/a-arrow-up';
|
|||||||
import { Spring } from 'svelte/motion';
|
import { Spring } from 'svelte/motion';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
/**
|
||||||
|
* Ref
|
||||||
|
*/
|
||||||
wrapper?: HTMLDivElement | null;
|
wrapper?: HTMLDivElement | null;
|
||||||
|
/**
|
||||||
|
* Slider position
|
||||||
|
*/
|
||||||
sliderPos: number;
|
sliderPos: number;
|
||||||
|
/**
|
||||||
|
* Whether slider is being dragged
|
||||||
|
*/
|
||||||
isDragging: boolean;
|
isDragging: boolean;
|
||||||
|
/**
|
||||||
|
* Text to display
|
||||||
|
*/
|
||||||
text: string;
|
text: string;
|
||||||
|
/**
|
||||||
|
* Container width
|
||||||
|
*/
|
||||||
containerWidth: number;
|
containerWidth: number;
|
||||||
|
/**
|
||||||
|
* Weight control
|
||||||
|
*/
|
||||||
weightControl: TypographyControl;
|
weightControl: TypographyControl;
|
||||||
|
/**
|
||||||
|
* Size control
|
||||||
|
*/
|
||||||
sizeControl: TypographyControl;
|
sizeControl: TypographyControl;
|
||||||
|
/**
|
||||||
|
* Height control
|
||||||
|
*/
|
||||||
heightControl: TypographyControl;
|
heightControl: TypographyControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user