Skip to content

Commit

Permalink
Move label text into component
Browse files Browse the repository at this point in the history
  • Loading branch information
abigailalexander committed Aug 22, 2024
1 parent e9d2519 commit c007e54
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/ui/widgets/Symbol/symbol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@ export const SymbolComponent = (props: SymbolComponentProps): JSX.Element => {
imageFile = imageFile.replace(regex, ` ${intValue.toFixed(0)}.`);
}

// Symbol in Phoebus has no label but can display index
const labelText = isBob
? showIndex
? index.toString()
: ""
: props.value?.getStringValue();

let alignItems = "center";
let justifyContent = "center";
switch (props.labelPosition) {
Expand Down Expand Up @@ -182,7 +175,7 @@ export const SymbolComponent = (props: SymbolComponentProps): JSX.Element => {
<LabelComponent
{...props}
backgroundColor={Color.TRANSPARENT}
text={labelText}
text={props.value?.getStringValue()}
></LabelComponent>
</div>
</div>
Expand Down

0 comments on commit c007e54

Please sign in to comment.