How to use less functions in React Function Component

How to use less functions in React Function Component like const MyComponent = ({color}) => … Read more How to use less functions in React Function Component

How to use less functions in React Function Component

like

const MyComponent = ({color}) => {
 const bgStyle = {
  backgroundColor: `darken(${color}, 10%)`
 }

 return <div style={bgStyle} />
}

Source: CSS – Stack Overflow


Categories: NewsTags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *