diff --git a/.changeset/happy-grapes-relate.md b/.changeset/happy-grapes-relate.md new file mode 100644 index 000000000..89c47160a --- /dev/null +++ b/.changeset/happy-grapes-relate.md @@ -0,0 +1,6 @@ +--- +"@knocklabs/client": patch +"@knocklabs/react": patch +--- + +[Guides] Add a Open in dashboard button to guide toolbar v2 diff --git a/packages/client/src/clients/guide/types.ts b/packages/client/src/clients/guide/types.ts index d57ae5276..f1c834a6b 100644 --- a/packages/client/src/clients/guide/types.ts +++ b/packages/client/src/clients/guide/types.ts @@ -72,6 +72,7 @@ export interface GuideData { activation_url_rules: GuideActivationUrlRuleData[]; activation_url_patterns: GuideActivationUrlPatternData[]; bypass_global_group_limit: boolean; + dashboard_url: string | null; inserted_at: string; updated_at: string; } diff --git a/packages/react/src/modules/guide/components/Toolbar/V2/GuideRowDetails.tsx b/packages/react/src/modules/guide/components/Toolbar/V2/GuideRowDetails.tsx index d89c499db..aa3ba0778 100644 --- a/packages/react/src/modules/guide/components/Toolbar/V2/GuideRowDetails.tsx +++ b/packages/react/src/modules/guide/components/Toolbar/V2/GuideRowDetails.tsx @@ -1,3 +1,4 @@ +import { Button } from "@telegraph/button"; import { Box, Stack } from "@telegraph/layout"; import { Tooltip } from "@telegraph/tooltip"; import { Text } from "@telegraph/typography"; @@ -30,7 +31,7 @@ const CardContainer = ({ bg="surface-1" border="px" borderColor="gray-4" - style={{ flex: 1 }} + style={{ flex: 1, alignSelf: "stretch" }} > {title} @@ -129,13 +130,13 @@ export const GuideRowDetails = ({ ); } - const { annotation } = guide; + const { annotation, dashboard_url: dashboardUrl } = guide; const selectableStatusSummary = getSelectableStatusSummary( annotation.selectable.status, ); return ( - + - + + {dashboardUrl && ( + + )} + ); };