import { UiNode, UiNodeTextAttributes, UiText } from "@ory/client" import { CodeBox, P } from "@ory/themes" import styled from "styled-components" interface Props { node: UiNode attributes: UiNodeTextAttributes } const ScrollableCodeBox = styled(CodeBox)` overflow-x: auto; ` const Content = ({ node, attributes }: Props) => { switch (attributes.text.id) { case 1050015: // This text node contains lookup secrets. Let's make them a bit more beautiful! const secrets = (attributes.text.context as any).secrets.map( (text: UiText, k: number) => (
{/* Used lookup_secret has ID 1050014 */} {text.id === 1050014 ? "Used" : text.text}
), ) return (
{secrets}
) } return (
) } export const NodeText = ({ node, attributes }: Props) => { return ( <>

{node.meta?.label?.text}

) }