Skip to content

Commit

Permalink
Embed chart mobile UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed Jul 22, 2021
1 parent fec6409 commit c489f5a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/EmbedChartBlock/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class EmbedChartBlockEdit extends Component {
</SidebarPortal>

<UiForm>
<Segment.Group horizontal>
<Segment className="text-segment">
<Segment.Group horizontal className="mobile-col">
<Segment className="text-segment mobile-full">
<div
style={{ minWidth: '73px' }}
ref={this.textEditorSegmentNode}
Expand Down
6 changes: 3 additions & 3 deletions src/EmbedChartBlock/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ const EmbedChartView = ({
<div className="chartWrapperView">
{data.block_title ? <h5>{data.block_title}</h5> : ''}
<div className="block-inner-wrapper">
<div className="element-grid">
<div className="element-grid mobile-col">
{hasText && isNewEditor ? (
<div
className={`${layout_type}-${grid.text_column[layout_type]} text-segment`}
className={`${layout_type}-${grid.text_column[layout_type]} text-segment mobile-full`}
>
<div
className="block-text-content"
className="block-text-content mobile-full"
style={{ padding: '1rem', marginTop: '.5rem' }}
>
{serializeNodes(data.text.blocks || [])}
Expand Down
10 changes: 10 additions & 0 deletions src/EmbedChartBlock/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@
max-width: 40%;
word-break: break-word;
}

@media screen and (max-width: 600px) {
.mobile-col {
flex-direction: column !important;
}

.mobile-full {
min-width: 100% !important;
}
}

0 comments on commit c489f5a

Please sign in to comment.