1 | import React from 'react';
|
2 | import extractViewBox from '../lib/extract/extractViewBox';
|
3 | import Shape from './Shape';
|
4 | import { RNSVGSymbol } from './NativeComponents';
|
5 |
|
6 | export default class Symbol extends Shape<{
|
7 | id?: string;
|
8 | viewBox?: string;
|
9 | preserveAspectRatio?: string;
|
10 | }> {
|
11 | static displayName = 'Symbol';
|
12 |
|
13 | render() {
|
14 | const { props } = this;
|
15 | const { id, children } = props;
|
16 | const symbolProps = { name: id };
|
17 | return (
|
18 | <RNSVGSymbol
|
19 | ref={this.refMethod}
|
20 | {...symbolProps}
|
21 | {...extractViewBox(props)}
|
22 | >
|
23 | {children}
|
24 | </RNSVGSymbol>
|
25 | );
|
26 | }
|
27 | }
|