UNPKG

614 BTypeScriptView Raw
1import React from 'react';
2import extractViewBox from '../lib/extract/extractViewBox';
3import Shape from './Shape';
4import { RNSVGSymbol } from './NativeComponents';
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 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}