Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
#764 LongText widget has forced primary type
Browse files Browse the repository at this point in the history
  • Loading branch information
damianprzygodzki committed May 22, 2017
1 parent 9f8ccba commit 0379d5f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/widget/RawWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class RawWidget extends Component {
})
}

getClassnames = (icon) => {
getClassnames = (icon, forcedPrimary) => {
const {
widgetData, disabled, gridAlign, type, updated, rowId, isModal
} = this.props;
Expand All @@ -125,7 +125,8 @@ class RawWidget extends Component {
) &&
!isEdited) ? 'input-error ' : '') +
(gridAlign ? 'text-xs-' + gridAlign + ' ' : '') +
(type === 'primary' ? 'input-primary ' : 'input-secondary ') +
(type === 'primary' || forcedPrimary ?
'input-primary ' : 'input-secondary ') +
(updated ? 'pulse-on ' : 'pulse-off ') +
(rowId && !isModal ? 'input-table ' : '');
}
Expand Down Expand Up @@ -390,7 +391,7 @@ class RawWidget extends Component {
case 'LongText':
return (
<div className={
this.getClassnames() +
this.getClassnames(false, true) +
(isEdited ? 'input-focused ' : '')
}>
<textarea
Expand Down

0 comments on commit 0379d5f

Please sign in to comment.