我想设置某些元素的样式属性,但语法不正确。谁能建议我错在哪里?
import React from 'react';
import debug from 'debug'
const log = debug('app:component:Header');
var bgColors = { "Default": "#81b71a",
                    "Blue": "#00B1E1",
                    "Cyan": "#37BC9B",
                    "Green": "#8CC152",
                    "Red": "#E9573F",
                    "Yellow": "#F6BB42",
};
export default class SideBar extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
    <a style="{{backgroundColor: {bgColors.Default}}}" >default</a>
    <a style="{{backgroundColor: {bgColors.Blue}}}" >blue</a>
    <a style="{{backgroundColor: {bgColors.Cyan}}}" >cyan</a>
    <a style="{{backgroundColor: {bgColors.Green}}}" >green</a>
    <a style="{{backgroundColor: {bgColors.Red}}}"  >red</a>
    <a style="{{backgroundColor: {bgColors.Yellow}}}" >yellow</a>
           );
  }
}
更新:对于查看此内容的任何人,请参阅评论,这不是工作代码。