mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
21 lines
510 B
JavaScript
21 lines
510 B
JavaScript
import React from "react";
|
|
import { requireNativeComponent } from "react-native";
|
|
import extractViewBox from "../lib/extract/extractViewBox";
|
|
import Shape from "./Shape";
|
|
|
|
export default class Symbol extends Shape {
|
|
static displayName = "Symbol";
|
|
|
|
render() {
|
|
const { props } = this;
|
|
const { id, children } = props;
|
|
return (
|
|
<RNSVGSymbol name={id} {...extractViewBox(props)}>
|
|
{children}
|
|
</RNSVGSymbol>
|
|
);
|
|
}
|
|
}
|
|
|
|
const RNSVGSymbol = requireNativeComponent("RNSVGSymbol");
|