mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-16 06:05:50 -06:00
1.4 KiB
1.4 KiB
Area.Line
A straigt line to be displayed in an Area component.
import React, { Component } from 'react';
import { render, Window, App, Area } from 'proton-native';
class Example extends Component {
render() {
return (
<App>
<Window title="Example" size={{ w: 500, h: 500 }}>
<Area>
<Area.Line x1="50" y1="50" x2="100" y2="200" stroke="blue" />
</Area>
</Window>
</App>
);
}
}
render(<Example />);
Props
- x1
- y1
- x2
- y2
- (All props listed in Area Props)
Reference
x1
The x coordinate of the line's start point.
| Type | Required |
|---|---|
| number | string (number) | true |
y1
The y coordinate of the line's start point.
| Type | Required |
|---|---|
| number | string (number) | true |
x2
The x coordinate of the line's end point.
| Type | Required |
|---|---|
| number | string (number) | true |
y2
The y coordinate of the line's end point.
| Type | Required |
|---|---|
| number | string (number) | true |