-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Example live prices animate on transition
- Loading branch information
Showing
14 changed files
with
161 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
website/src/components/Playground/editor-types/@number-flow/react.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { NumberFlowLite, Value, Format } from 'number-flow'; | ||
import * as React from 'react'; | ||
export { Format, Trend, Value } from 'number-flow'; | ||
|
||
declare const OBSERVED_ATTRIBUTES: readonly ['parts']; | ||
type ObservedAttribute = (typeof OBSERVED_ATTRIBUTES)[number]; | ||
declare class NumberFlowElement extends NumberFlowLite { | ||
static observedAttributes: readonly ['parts']; | ||
attributeChangedCallback( | ||
attr: ObservedAttribute, | ||
_oldValue: string, | ||
newValue: string, | ||
): void; | ||
} | ||
type NumberFlowProps = React.HTMLAttributes<NumberFlowElement> & { | ||
value: Value; | ||
locales?: Intl.LocalesArgument; | ||
format?: Format; | ||
isolate?: boolean; | ||
animated?: boolean; | ||
respectMotionPreference?: boolean; | ||
willChange?: boolean; | ||
onAnimationsStart?: () => void; | ||
onAnimationsFinish?: () => void; | ||
trend?: (typeof NumberFlowElement)['prototype']['trend']; | ||
opacityTiming?: (typeof NumberFlowElement)['prototype']['opacityTiming']; | ||
transformTiming?: (typeof NumberFlowElement)['prototype']['transformTiming']; | ||
spinTiming?: (typeof NumberFlowElement)['prototype']['spinTiming']; | ||
}; | ||
declare const NumberFlow: ( | ||
options: React.HTMLAttributes<NumberFlowElement> & { | ||
value: Value; | ||
locales?: Intl.LocalesArgument; | ||
format?: Format; | ||
isolate?: boolean; | ||
animated?: boolean; | ||
respectMotionPreference?: boolean; | ||
willChange?: boolean; | ||
onAnimationsStart?: () => void; | ||
onAnimationsFinish?: () => void; | ||
trend?: (typeof NumberFlowElement)['prototype']['trend']; | ||
opacityTiming?: (typeof NumberFlowElement)['prototype']['opacityTiming']; | ||
transformTiming?: (typeof NumberFlowElement)['prototype']['transformTiming']; | ||
spinTiming?: (typeof NumberFlowElement)['prototype']['spinTiming']; | ||
} & React.RefAttributes<NumberFlowElement>, | ||
) => JSX.Element; | ||
|
||
declare function useCanAnimate({ | ||
respectMotionPreference, | ||
}?: { | ||
respectMotionPreference?: boolean | undefined; | ||
}): boolean; | ||
|
||
export { | ||
NumberFlowElement, | ||
type NumberFlowProps, | ||
NumberFlow as default, | ||
useCanAnimate, | ||
}; |
Oops, something went wrong.