Skip to content

Commit

Permalink
Merge pull request #219 from Cognifide/bugfix/text-widget-vertical-ex…
Browse files Browse the repository at this point in the history
…pand

Text widget - removal of expand content for vertical configuration
  • Loading branch information
Southeaven authored Jan 13, 2020
2 parents a0d2168 + 5bc69bd commit c98fdc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cogboard-webapp/src/components/Widget/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ const Widget = ({ id, index }) => {
config: { columns, goNewLine, rows },
...widgetTypeData
} = widgetData;
const { expandContent } = widgetTypeData;
const { expandContent: isExpandContent, isVertical } = widgetTypeData;
const expandContent =
type === 'TextWidget' && isVertical ? false : isExpandContent;
const widgetTypeConfig = widgetTypes[type];
const widgetStatus = getWidgetStatus(content, widgetTypeConfig);
const widgetUpdateTimestamp = getWidgetUpdateTime(content, widgetTypeConfig);
Expand Down Expand Up @@ -164,6 +166,7 @@ const Widget = ({ id, index }) => {
isLoggedIn={isAuthenticated}
isDragging={isDragging}
isOver={isOver}
isVertical={isVertical}
ref={ref}
type={type}
expanded={expanded}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const StyledPre = styled.pre`

export const RotatedStyledPre = styled(StyledPre)`
transform: rotate(-90deg);
margin-top: 20px;
white-space: nowrap;
`;

Expand Down

0 comments on commit c98fdc2

Please sign in to comment.