Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs React-如何将fontsize添加到React.createElement中?_Reactjs_Fonts_Createelement - Fatal编程技术网

Reactjs React-如何将fontsize添加到React.createElement中?

Reactjs React-如何将fontsize添加到React.createElement中?,reactjs,fonts,createelement,Reactjs,Fonts,Createelement,我是一个新手,正在学习React-我有以下功能的一部分: AlertNotifications.prototype.render = function () { return (React.createElement("div", null, this.props.alerts.map(function (alert) { return React.createElement(MessageBar, { messageBarType: alert.type === A

我是一个新手,正在学习React-我有以下功能的一部分:

AlertNotifications.prototype.render = function () {
    return (React.createElement("div", null, this.props.alerts.map(function (alert) { return React.createElement(MessageBar, { messageBarType: alert.type === AlertType.Urgent ? MessageBarType.severeWarning : MessageBarType.warning, isMultiline: false },
        alert.message,
        alert.moreInformationUrl ? React.createElement("a", { href: alert.moreInformationUrl }, strings.MoreInformation) : ''); })));
};
return AlertNotifications;
我需要更改返回的DIV的fontsize-您能告诉我需要更改什么吗-或者添加到上面以将fontsize更改为Arial 16px吗

非常感谢


G

您可以添加一个类并设置其样式

React.createElement('div', {class-here}, .......)