1.0.1 • Published 5 years ago

myfirst-react-component v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

myfirst-react-component

my first react component

Installation

npm install --save myfirst-react-component

How To Use

First import this component where you want to use it

import ReactColorSquare from "myfirst-react-component"

Then just renders it

<ReactColorSqaure />

Props

PropDescriptionDefault value
colorSets background colorblue
widthSets width100
heightSets height100
textSets inner textempty string

Example

import React, { Component } from "react";
import ReactColorSquare from "myfirst-react-component";

class App extends Component {
  render() {
    return (
        <ReactColorSquare height={150} color="red" text="Hello World!" />
    );
  }
}

export default App;