How to pass padding/margin as props in React-Bootstrap components

前端 未结 6 1534
闹比i
闹比i 2021-02-15 11:09

I am trying to apply margins and paddings with React-Bootstrap as props.

I passed the docs through but haven\'t found any mention adding padding or margin in there as it

6条回答
  •  野的像风
    2021-02-15 11:55

    You can add margin and padding by using default React's style:

    const divStyle = {
      marginLeft: '10px',
    };
    
    function HelloWorldComponent() {
      return 
    Hello World!
    ; }

    Refrenced from here

提交回复
热议问题