diff --git a/mission-control/docs/reference/notifications/template_functions.mdx b/mission-control/docs/reference/notifications/template_functions.mdx new file mode 100644 index 0000000..e867a7d --- /dev/null +++ b/mission-control/docs/reference/notifications/template_functions.mdx @@ -0,0 +1,101 @@ +--- +title: Template Functions +--- + +Special Slack template functions are made available on notifications to complex block formation easier. + +**slackHealthEmoji:** + + +**labelsFormat:** + + +**slackSectionLabels:** + + +**slackSectionTextFieldPlain:** + + +**slackSectionTextFieldMD:** + + +**slackSectionTextMD:** + + +**slackSectionTextPlain:** + + +**SlackURLAction:** + + +export function SlackHealthEmoji() { + return <> +
+			slackHealthEmoji(health): string
+		
+

Returns a slack emoji based on the supplied health

+ +} + +export function LabelsFormat() { + return <> +
+			labelsFormat(map[string]any): string
+		
+

Formats the given set of labels

+ +} + +export const SlackSectionLabels = () => ( + <> +
+			slackSectionLabels(map[string]any): SlackSection
+		
+

Formats the given set of labels into fields of a slack section block

+ +) + +export const SlackSectionTextFieldPlain = () => ( + <> +
+			slackSectionTextFieldPlain(text: string): string
+		
+

Creates a plain text field for a Slack section block

+ +) + +export const SlackSectionTextFieldMD = () => ( + <> +
+			slackSectionTextFieldMD(text: string): string
+		
+

Creates a markdown text field for a Slack section block

+ +) + +export const SlackSectionTextMD = () => ( + <> +
+			slackSectionTextMD(text: string): string
+		
+

Creates a Slack section block with markdown text

+ +) + +export const SlackSectionTextPlain = () => ( + <> +
+			slackSectionTextPlain(text: string): string
+		
+

Creates a Slack section block with plain text

+ +) + +export const SlackURLAction = () => ( + <> +
+			slackURLAction(name: string, url: string): string
+		
+

Creates a Slack action block with a URL button

+ +)