🎥 Make videos programmatically with React
Docs: Improve SuggestedPrompt skill prompt (#9030)
Jonny Burger1447c335a869
diff --git a/packages/docs/docs/studio/interactivity-best-practices.mdx b/packages/docs/docs/studio/interactivity-best-practices.mdxindex 4c9b2cfd92..f57d9d5c21 100644--- a/packages/docs/docs/studio/interactivity-best-practices.mdx+++ b/packages/docs/docs/studio/interactivity-best-practices.mdx@@ -39,10 +39,6 @@ Use the [`Interactive`](/docs/interactive) namespace when an HTML or SVG elementFor a custom component, see [Make a component interactive](/docs/studio/make-component-interactive).-```txt title="Prompt"-Make this interactive in the Remotion Studio: https://www.remotion.dev/docs/studio/interactivity-best-practices.md-```-## Give interactive elements a descriptive name {#give-interactive-elements-a-descriptive-name}Add a `name` prop to interactive elements and custom interactive components.@@ -64,6 +60,8 @@ The name is shown in the Studio timeline and helps agents identify the correct e## Keep editable values visible {#keep-editable-values-visible}+<SuggestedPrompt prompt="/remotion-interactivity Inline the values to make them editable." />+Put values that should be edited in the Studio directly into the JSX.This applies to static style values, keyframes, easing and transform props.diff --git a/packages/docs/src/components/SuggestedPrompt.tsx b/packages/docs/src/components/SuggestedPrompt.tsxindex 5928c208a5..8ce0851cfb 100644--- a/packages/docs/src/components/SuggestedPrompt.tsx+++ b/packages/docs/src/components/SuggestedPrompt.tsx@@ -40,6 +40,7 @@ const parsePrompt = (prompt: string) => {export const SuggestedPrompt: React.FC<Props> = ({prompt}) => {const [copied, setCopied] = useState(false);+ const [isSkillLinkHovered, setIsSkillLinkHovered] = useState(false);const {command, rest} = useMemo(() => parsePrompt(prompt), [prompt]);const onCopy = async () => {@@ -58,12 +59,13 @@ export const SuggestedPrompt: React.FC<Props> = ({prompt}) => {borderRadius: 18,marginTop: 16,marginBottom: 16,- backgroundColor: 'var(--ifm-color-emphasis-100)',+ border: '1px solid var(--border-color)',+ backgroundColor: 'var(--ifm-background-color)',color: 'var(--text-color)',display: 'flex',- alignItems: 'center',+ alignItems: 'flex-start',gap: 12,- padding: '16px 18px',+ padding: '8px 8px 16px 18px',boxShadow: '0 6px 24px rgba(0, 0, 0, 0.08)',}}>@@ -76,14 +78,32 @@ export const SuggestedPrompt: React.FC<Props> = ({prompt}) => {lineHeight: 1.6,}}>+ <a+ href="/docs/ai/skills"+ onMouseEnter={() => setIsSkillLinkHovered(true)}+ onMouseLeave={() => setIsSkillLinkHovered(false)}+ style={{+ color: isSkillLinkHovered+ ? 'var(--ifm-color-primary)'+ : 'var(--subtitle)',+ display: 'inline-block',+ fontSize: 13,+ fontWeight: 500,+ lineHeight: 1.2,+ marginBottom: 6,+ textDecoration: 'none',+ }}+ >+ Agent Skill+ </a>+ <br />{command ? (<spanstyle={{- border: '1px solid var(--ifm-color-emphasis-200)',borderRadius: 6,padding: '1px 6px',color: 'var(--ifm-color-primary)',- backgroundColor: 'var(--ifm-background-surface-color)',+ backgroundColor: 'rgba(11, 132, 243, 0.06)',fontWeight: 700,whiteSpace: 'nowrap',display: 'inline-block',