user2006734
user2006734

Reputation: 325

Is there a way to add border on a table of react component?

I am using below react component https://www.npmjs.com/package/react-sticky-table

Is there a way to add a border to this component?

const Row = require("react-sticky-table").Row;
<Row style={{ border: 3, bordercolor: "black" }}>

is invalid as far as I tried.

Upvotes: 2

Views: 12153

Answers (2)

okumu justine
okumu justine

Reputation: 368

use borderColor not bordercolor, it should be in camel case and set the borderWidth as well

better method is

<Row style={{border: "3px solid rgb(0, 0, 0)"}}>

Upvotes: 3

ChrisY
ChrisY

Reputation: 3

The style options you pass in should be in CamelCase, ie. borderColor. You should also probably pass in borderStyle: 'solid' into the style argument.

Upvotes: 0

Related Questions