Skip to content

Commit

Permalink
add subtitle in form editor (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlong9278 authored Nov 26, 2019
1 parent 19c9bc3 commit ff5e1af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export const RootField: React.FC<RootFieldProps> = props => {
return designerName || dialogName || sdkOverrides.title || title || schema.title || startCase(name);
};

const getSubTitle = (): string => {
return sdkOverrides.title;
};

const getDescription = (): string => {
return sdkOverrides.description || description || schema.description || '';
};
Expand All @@ -65,6 +69,7 @@ export const RootField: React.FC<RootFieldProps> = props => {
styleOverrides={{ field: { fontWeight: FontWeights.semibold } }}
fontSize={FontSizes.size20}
/>
{sdkOverrides.title && <p className="RootFieldSubtitle">{getSubTitle()}</p>}
{sdkOverrides.description !== false && (description || schema.description) && (
<p className={classnames('RootFieldDescription', FontClassNames.smallPlus)}>
{getDescription()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@
.RootFieldTitle {
border-bottom: 1px solid #c8c6c4;
padding: 0 18px;
margin-bottom: 16px;
margin-bottom: 0px;
}
.RootFieldSubtitle {
height: 15px;
line-height: 15px;
font-size: 10px;
color: #bdbdbd;
margin: -7px 0 7px;
}
.RootFieldDescription {
margin-top: 0;
Expand Down

0 comments on commit ff5e1af

Please sign in to comment.