admin管理员组

文章数量:1391974

I am using below react ponent

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

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

is invalid as far as I tried.

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

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

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

is invalid as far as I tried.

Share Improve this question edited Dec 16, 2019 at 7:45 Sarvesh Mahajan 9247 silver badges18 bronze badges asked Dec 16, 2019 at 6:48 user2006734user2006734 3251 gold badge5 silver badges19 bronze badges 1
  • You can create a css file and write your style in it and then add that class to this ponent. – siddhartha kumar verma Commented Dec 16, 2019 at 7:23
Add a ment  | 

2 Answers 2

Reset to default 3

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)"}}>

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

本文标签: javascriptIs there a way to add border on a table of react componentStack Overflow