Skip to content

Commit

Permalink
Add Error component to the DataField.js
Browse files Browse the repository at this point in the history
  • Loading branch information
InnaBoitsun committed Sep 8, 2017
1 parent 28fe1d6 commit 48eacd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ const Headline = styled.h4`
color: ${colors.fieldLabelColor};
`;

const Error = styled.span`
color: red;
font-size: 12px;
`;


const DataField = props => {
let handleChange, defaultOption, inputElement, options;
Expand Down Expand Up @@ -76,6 +81,7 @@ const DataField = props => {
null}
{inputElement}
{props.help ? <HelpIcon text={props.help} /> : null}
{props.error ? <Error>{props.error}</Error> : null}
</DataFieldWrapper>
);
};
Expand Down
2 changes: 2 additions & 0 deletions Website/WebSite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@
<Content Include="Composite\console\components\presentation\ActionButton.js" />
<Content Include="Composite\console\components\presentation\CheckboxGroup.js" />
<Content Include="Composite\console\components\presentation\DataField.js" />
<Content Include="Composite\console\components\presentation\DataFieldLabel.js" />
<Content Include="Composite\console\components\presentation\DataFieldWrapper.js" />
<Content Include="Composite\console\components\presentation\Dialog.js" />
<Content Include="Composite\console\components\presentation\Fieldset.js" />
<Content Include="Composite\console\components\presentation\FormTab.js" />
Expand Down

0 comments on commit 48eacd4

Please sign in to comment.