UNPKG

610 BTypeScriptView Raw
1import React from 'react';
2import { requireNativeComponent } from 'react-native';
3import extractViewBox from '../lib/extract/extractViewBox';
4import Shape from './Shape';
5
6export 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
24export const RNSVGSymbol = requireNativeComponent('RNSVGSymbol');