1 | import React from 'react';
|
2 | import { requireNativeComponent } from 'react-native';
|
3 | import extractViewBox from '../lib/extract/extractViewBox';
|
4 | import Shape from './Shape';
|
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 | return (
|
17 | <RNSVGSymbol ref={this.refMethod} name={id} {...extractViewBox(props)}>
|
18 | {children}
|
19 | </RNSVGSymbol>
|
20 | );
|
21 | }
|
22 | }
|
23 |
|
24 | export const RNSVGSymbol = requireNativeComponent('RNSVGSymbol');
|