// tslint:disable max-classes-per-file
import React from 'react';
import * as Svg from 'react-native-svg';
import Example from './Example';
const { Circle, Line, Rect, Text, Use } = Svg;
interface State {
fill: string;
}
// See: https://github.com/expo/expo/pull/10229#discussion_r490961694
// eslint-disable-next-line @typescript-eslint/ban-types
class GExample extends React.Component<{}, State> {
static title = 'G children props inherit';
readonly state: State = {
fill: 'purple',
};
_unmounted?: boolean;
componentDidMount = () => {
setTimeout(() => {
if (!this._unmounted) {
this.setState({
fill: '#856',
});
}
}, 2000);
};
componentWillUnmount = () => {
this._unmounted = true;
};
render() {
return (
);
}
}
class GTransform extends React.Component {
static title = 'G transform';
render() {
return (
Text grouped with shapes
);
}
}
const icon = (
);
const G: Example = {
icon,
samples: [GExample, GTransform],
};
export default G;