Skip to content

Commit

Permalink
fix: labelElement should return an inline <label> instead of block …
Browse files Browse the repository at this point in the history
…ele `div` (#3)

* fix: label element should return an inline <label> instead of div

* eslint
  • Loading branch information
nileshgulia1 authored Apr 13, 2022
1 parent ec98bf0 commit 47a3407
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/editor/LabelWrapper.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Popup, Label } from 'semantic-ui-react';
import { Popup } from 'semantic-ui-react';
import cx from 'classnames';
import {
serializeNodes,
Expand All @@ -21,9 +21,11 @@ const LabelWrapper = (props) => {
on={!data.always_show && 'click'}
trigger={
label_type ? (
<Label className={cx(label_type, label_pointing, 'with-popup')}>
<label
className={cx(label_type, label_pointing, 'with-popup ui label')}
>
{children}
</Label>
</label>
) : (
<span
id={`label_ref-${uid}`}
Expand All @@ -39,7 +41,9 @@ const LabelWrapper = (props) => {
{serializeNodes(data.tooltip_content)}
</Popup>
) : (
<Label className={cx(label_type, label_pointing)}>{children}</Label>
<label className={cx(label_type, label_pointing, 'ui label')}>
{children}
</label>
);
};

Expand Down

0 comments on commit 47a3407

Please sign in to comment.