This repository has been archived by the owner on Aug 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from FormidableLabs/update-for-rnsvg-6
Update for rnsvg 6
- Loading branch information
Showing
7 changed files
with
7,788 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
import React from "react"; | ||
import { G } from "react-native-svg"; | ||
import Svg from "react-native-svg"; | ||
import { Portal } from "victory-core/src"; | ||
|
||
export default class extends Portal { | ||
static defaultProps = { | ||
...Portal.defaultProps, | ||
groupComponent: <G/> | ||
}; | ||
|
||
render() { | ||
return React.cloneElement( | ||
this.props.groupComponent, | ||
{}, | ||
Object.keys(this.map).map((key) => { | ||
const el = this.map[key]; | ||
return el ? React.cloneElement(el, { key }) : <G/>; | ||
}) | ||
); | ||
return <Svg {...this.props}>{this.getChildren()}</Svg>; | ||
} | ||
} |
Oops, something went wrong.