mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-16 17:25:58 +00:00
Added support for multi line descriptions in self serve framework (#1266)
* Added support for multi line descriptions * test snapshot change * addresse pr comments
This commit is contained in:
parent
9cb4632f32
commit
fcfc52a80c
@ -181,7 +181,7 @@ export class SmartUiComponent extends React.Component<SmartUiComponentProps, Sma
|
|||||||
const descriptionElement = (
|
const descriptionElement = (
|
||||||
<Stack>
|
<Stack>
|
||||||
{labelElement}
|
{labelElement}
|
||||||
<Text id={`${dataFieldName}-text-display`} aria-labelledby={labelId}>
|
<Text id={`${dataFieldName}-text-display`} aria-labelledby={labelId} style={{ whiteSpace: "pre-line" }}>
|
||||||
{this.props.getTranslation(description.textTKey)}{" "}
|
{this.props.getTranslation(description.textTKey)}{" "}
|
||||||
{description.link && (
|
{description.link && (
|
||||||
<Link target="_blank" href={description.link.href}>
|
<Link target="_blank" href={description.link.href}>
|
||||||
|
@ -27,6 +27,11 @@ exports[`SmartUiComponent disable all inputs 1`] = `
|
|||||||
<Text
|
<Text
|
||||||
aria-labelledby="description-label"
|
aria-labelledby="description-label"
|
||||||
id="description-text-display"
|
id="description-text-display"
|
||||||
|
style={
|
||||||
|
Object {
|
||||||
|
"whiteSpace": "pre-line",
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
this is an example description text.
|
this is an example description text.
|
||||||
|
|
||||||
@ -341,6 +346,11 @@ exports[`SmartUiComponent should render and honor input's hidden, disabled state
|
|||||||
<Text
|
<Text
|
||||||
aria-labelledby="description-label"
|
aria-labelledby="description-label"
|
||||||
id="description-text-display"
|
id="description-text-display"
|
||||||
|
style={
|
||||||
|
Object {
|
||||||
|
"whiteSpace": "pre-line",
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
this is an example description text.
|
this is an example description text.
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RegionsAndAccountNameValidationError": "Regions and account name should not be empty.",
|
"RegionsAndAccountNameValidationError": "Regions and account name should not be empty.",
|
||||||
"DbThroughputValidationError": "Please update throughput for database.",
|
"DbThroughputValidationError": "Please update throughput for database.",
|
||||||
"DescriptionLabel": "Description",
|
"DescriptionLabel": "Description",
|
||||||
"DescriptionText": "This class sets collection and database throughput.",
|
"DescriptionText": "This class sets collection and database throughput.\nTo know more -",
|
||||||
"DecriptionLinkText": "Click here for more information",
|
"DecriptionLinkText": "Click here for more information",
|
||||||
"Regions": "Regions",
|
"Regions": "Regions",
|
||||||
"RegionsPlaceholder": "Select a region",
|
"RegionsPlaceholder": "Select a region",
|
||||||
|
@ -179,6 +179,15 @@ export default class SelfServeExample extends SelfServeBaseClass {
|
|||||||
})
|
})
|
||||||
description: string;
|
description: string;
|
||||||
|
|
||||||
|
@Values({
|
||||||
|
description: {
|
||||||
|
textTKey: `This UI can be used to dynamically change the throughput.
|
||||||
|
This is an alternative to updating the throughput from the 'scale & settings' tab.`,
|
||||||
|
type: DescriptionType.Text,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
multiLineDescription: string;
|
||||||
|
|
||||||
@Values({
|
@Values({
|
||||||
labelTKey: "Current Region",
|
labelTKey: "Current Region",
|
||||||
isDynamicDescription: true,
|
isDynamicDescription: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user