main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
897 bytes
|
Line | |
---|
1 | import {NanoRenderer} from '../types/nano';
|
---|
2 |
|
---|
3 | export interface KeyframesAddon {
|
---|
4 | /**
|
---|
5 | * @param frames Map of keyframes.
|
---|
6 | * @param block Optional semantic name.
|
---|
7 | *
|
---|
8 | * Returns a generated animation name.
|
---|
9 | *
|
---|
10 | * ```js
|
---|
11 | * const animationName = nano.keyframes({
|
---|
12 | * from: {
|
---|
13 | * left: '0%',
|
---|
14 | * },
|
---|
15 | * to: {
|
---|
16 | * left: '100%',
|
---|
17 | * },
|
---|
18 | * });
|
---|
19 | * ```
|
---|
20 | *
|
---|
21 | * You need to install [`keyframes()` addon]()https://github.com/streamich/nano-css/blob/master/docs/keyframes.md) to use this method.
|
---|
22 | *
|
---|
23 | * ```js
|
---|
24 | * import {create} from 'nano-css';
|
---|
25 | * import {addon as addonKeyframes} from 'nano-css/addon/keyframes';
|
---|
26 | *
|
---|
27 | * const nano = create();
|
---|
28 | * addonKeyframes(nano);
|
---|
29 | * ```
|
---|
30 | */
|
---|
31 | keyframes: (frames: object, block?: string) => string;
|
---|
32 | }
|
---|
33 |
|
---|
34 | export function addon(nano: NanoRenderer);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.