Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | import React from "react"; import styled from "styled-components"; import { fadeIn } from "ui/animations/animations"; import { useScriptEventTitle } from "components/script/hooks/useScriptEventTitle"; interface ScriptEventTitleProps { command: string; args?: Record<string, unknown>; } const Wrapper = styled.span` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; animation: ${fadeIn} 0.1s linear; `; const ScriptEventTitle = ({ command, args = {} }: ScriptEventTitleProps) => { const label = useScriptEventTitle(command, args, true); return <Wrapper>{label}</Wrapper>; }; export default ScriptEventTitle; |