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:
770 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import {CssLikeObject} from '../types/common';
|
---|
| 2 | import {NanoRenderer} from '../types/nano';
|
---|
| 3 |
|
---|
| 4 | export interface RuleAddon {
|
---|
| 5 | /**
|
---|
| 6 | * You need to install `rule` addon to add this method.
|
---|
| 7 | *
|
---|
| 8 | * ```js
|
---|
| 9 | * import {create} from 'nano-css';
|
---|
| 10 | * import {addon as addonRule} from 'nano-css/addon/rule';
|
---|
| 11 | *
|
---|
| 12 | * const nano = create();
|
---|
| 13 | * addonRule(nano);
|
---|
| 14 | *
|
---|
| 15 | * const className = nano.rule({
|
---|
| 16 | * color: 'red',
|
---|
| 17 | * });
|
---|
| 18 | * ```
|
---|
| 19 | *
|
---|
| 20 | * @param css [CSS-like object](https://github.com/streamich/nano-css/blob/master/docs/put.md#css-like-object).
|
---|
| 21 | * @param block Optional semantic name of this rule, must be unique.
|
---|
| 22 | */
|
---|
| 23 | rule: (css: CssLikeObject, block?: string) => string;
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | export function addon(nano: NanoRenderer);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.