Skip to content

Commit

Permalink
misc widget fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rvion committed Dec 4, 2023
1 parent cabe0f4 commit cd5cd2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/controls/shared/WidgetWithLabelUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const WidgetWithLabelUI = observer(function WidgetWithLabelUI_(p: {
isVertical ? 'w-full' : null,
WIDGET == null ? 'w-full' : null,
'min-w-max shrink-0',
'flex items-center gap-1',
'flex items-center gap-0',
'hover:bg-base-200 cursor-pointer',
]}
onClick={() => {
Expand Down Expand Up @@ -117,9 +117,10 @@ export const WidgetWithLabelUI = observer(function WidgetWithLabelUI_(p: {
</div>
)

const labelGap = label == false ? '' : 'gap-1'
let className = isVertical //
? `_WidgetWithLabelUI ${levelClass} flex flex-col items-baseline`
: `_WidgetWithLabelUI ${levelClass} flex flex-row ${isCollapsible ? 'items-baseline' : 'items-center'} gap-1`
: `_WidgetWithLabelUI ${levelClass} flex flex-row ${labelGap} ${isCollapsible ? 'items-baseline' : 'items-center'}`

if (WIDGET == null) className += ' w-full'
if (isVertical && WIDGET) {
Expand Down
2 changes: 1 addition & 1 deletion src/controls/widgets/WidgetMarkdownUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const WidgetMardownUI = observer(function WidgetMardownUI_(p: { widget: W
const req = p.widget
return (
<div //
className='_MD w-full'
className='_WidgetMardownUI _MD w-full'
dangerouslySetInnerHTML={{ __html: marked(req.markdown) }}
></div>
)
Expand Down

0 comments on commit cd5cd2c

Please sign in to comment.