0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-11 00:22:43 +00:00

[NFC] Add display name for custom React components

This improves readability of "Components" tab from React Development Tools extension for Chrome
This commit is contained in:
Alexey Sachkov
2021-12-29 21:18:54 +03:00
parent 7b19bbb1a7
commit 8a3f52b704
23 changed files with 28 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ const NaturalCritIcon = require('naturalcrit/svg/naturalcrit.svg.jsx');
const Nav = {
base : createClass({
displayName : 'Nav.base',
render : function(){
return <nav>
<div className='navContent'>
@@ -26,6 +27,7 @@ const Nav = {
},
section : createClass({
displayName : 'Nav.section',
render : function(){
return <div className='navSection'>
{this.props.children}
@@ -34,6 +36,7 @@ const Nav = {
}),
item : createClass({
displayName : 'Nav.item',
getDefaultProps : function() {
return {
icon : null,
@@ -69,6 +72,7 @@ const Nav = {
}),
dropdown : createClass({
displayName : 'Nav.dropdown',
getInitialState : function() {
return {
showDropdown : false