proton-native/docs/component_APIs/area_line.md

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

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