UNPKG

1.38 kBTypeScriptView Raw
1import { Component } from 'react';
2import { Middleware, UriProps, UriState, XmlProps, XmlState } from './xml';
3/**
4 * Moves + merges styles from style elements to element styles
5 *
6 * Options
7 * useMqs (default: ['', 'screen'])
8 * what media queries to be used
9 * empty string element for styles outside media queries
10 *
11 * usePseudos (default: [''])
12 * what pseudo-classes/-elements to be used
13 * empty string element for all non-pseudo-classes and/or -elements
14 *
15 * @param {Object} document document element
16 *
17 * @author strarsis <strarsis@gmail.com>
18 * @author modified by: msand <msand@abo.fi>
19 */
20export declare const inlineStyles: Middleware;
21export declare function SvgCss(props: XmlProps): JSX.Element;
22export declare function SvgCssUri(props: UriProps): JSX.Element;
23export declare class SvgWithCss extends Component<XmlProps, XmlState> {
24 state: {
25 ast: null;
26 };
27 componentDidMount(): void;
28 componentDidUpdate(prevProps: {
29 xml: string | null;
30 }): void;
31 parse(xml: string | null): void;
32 render(): JSX.Element;
33}
34export declare class SvgWithCssUri extends Component<UriProps, UriState> {
35 state: {
36 xml: null;
37 };
38 componentDidMount(): void;
39 componentDidUpdate(prevProps: {
40 uri: string | null;
41 }): void;
42 fetch(uri: string | null): Promise<void>;
43 render(): JSX.Element;
44}