Skip to content

Commit 944adf7

Browse files
SeterplusMinishlink
authored andcommitted
Add support for all view props
1 parent 2d005f5 commit 944adf7

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/index.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,28 @@ export default class LinearGradient extends PureComponent {
5050
.join(',');
5151

5252
render() {
53+
const {
54+
start,
55+
end,
56+
colors,
57+
locations,
58+
useAngle,
59+
angleCenter,
60+
angle,
61+
style,
62+
children,
63+
...otherProps
64+
} = this.props;
5365
return (
5466
<View
67+
{...otherProps}
5568
style={[
56-
this.props.style,
69+
style,
5770
{ backgroundImage: `linear-gradient(${this.getAngle()},${this.getColors()})` },
5871
]}
59-
testID={this.props.testID}
6072
onLayout={this.measure}
6173
>
62-
{this.props.children}
74+
{children}
6375
</View>
6476
);
6577
}

0 commit comments

Comments
 (0)