Skip to content

Commit 161a5d9

Browse files
authored
Fix documentation of Spring
1 parent e8461ce commit 161a5d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/spring/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export type SpringSetter<T> = (
7171
* @param initialValue The initial value of the signal.
7272
* @param options Options to configure the physics of the spring.
7373
* @returns Returns the spring value and a setter.
74+
* The setter optionally accepts options object of type `{ ?hard: boolean; soft?: boolean | number }`
7475
*
7576
* @example
7677
* const [progress, setProgress] = createSpring(0, { stiffness: 0.15, damping: 0.8 });
@@ -205,7 +206,7 @@ export function createSpring<T extends SpringTarget>(
205206
* @example
206207
* const percent = createMemo(() => current() / total() * 100);
207208
*
208-
* const springedPercent = createDerivedSignal(percent, { stiffness: 0.15, damping: 0.8 });
209+
* const springedPercent = createDerivedSpring(percent, { stiffness: 0.15, damping: 0.8 });
209210
*/
210211
export function createDerivedSpring<T extends SpringTarget>(
211212
target: Accessor<T>,

0 commit comments

Comments
 (0)