From b801cd84f0090a309cad1e96a6e4418bec85a758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Thu, 15 Oct 2020 20:42:58 +0200 Subject: [PATCH] Remove text property from Button because children is enough --- src/client/components/boardComponent.tsx | 10 +++++----- src/client/components/button.tsx | 3 +-- src/client/components/cardDialog.tsx | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/client/components/boardComponent.tsx b/src/client/components/boardComponent.tsx index f0a2f731b..2daba9314 100644 --- a/src/client/components/boardComponent.tsx +++ b/src/client/components/boardComponent.tsx @@ -141,7 +141,7 @@ class BoardComponent extends React.Component {
{`No ${boardTree.groupByProperty?.name}`}
-
@@ -165,7 +165,7 @@ class BoardComponent extends React.Component { className={`octo-label ${group.option.color}`} text={group.option.value} onChanged={(text) => { this.propertyNameChanged(group.option, text) }} /> -
@@ -182,7 +182,7 @@ class BoardComponent extends React.Component { )}
-
@@ -202,7 +202,7 @@ class BoardComponent extends React.Component { onDragStart={() => { this.draggedCard = card }} onDragEnd={() => { this.draggedCard = undefined }} /> )} - {/* Columns */} @@ -218,7 +218,7 @@ class BoardComponent extends React.Component { onDragStart={() => { this.draggedCard = card }} onDragEnd={() => { this.draggedCard = undefined }} /> )} - )}
diff --git a/src/client/components/button.tsx b/src/client/components/button.tsx index 2ee2874a9..93ce9ef55 100644 --- a/src/client/components/button.tsx +++ b/src/client/components/button.tsx @@ -6,7 +6,7 @@ type Props = { onClick?: (e: React.MouseEvent) => void style?: React.CSSProperties backgroundColor?: string - text?: string + children?: React.ReactNode title?: string } @@ -20,7 +20,6 @@ export default class Button extends React.Component { style={style} title={this.props.title}> {this.props.children} - {this.props.text}
) } } diff --git a/src/client/components/cardDialog.tsx b/src/client/components/cardDialog.tsx index 81d42415e..718fc2465 100644 --- a/src/client/components/cardDialog.tsx +++ b/src/client/components/cardDialog.tsx @@ -125,7 +125,7 @@ class CardDialog extends React.Component {
- + }}>...
{icon ?