Skip to content

Commit

Permalink
(docs) add delay constant
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Sep 24, 2024
1 parent 1606d51 commit a616eb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/src/components/Terminal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const replReady = () => {

import { initTerminal, destroyTerminal } from './terminal';

import { delay } from '@site/src/constants';
import github from './github';
import echo from './echo';
import source from './source';
Expand All @@ -31,7 +32,7 @@ const terminal_scripts = [
];

function command(term: RefObject<JQueryTerminal>) {
const options = { typing: true, delay: 50 };
const options = { typing: true, delay };
return (command: string, silent: boolean = false) => () => {
setTimeout(() => {
term.current.focus().exec(command, { ...options, silent });
Expand Down
2 changes: 2 additions & 0 deletions docs/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// echo animation delay
export const delay = 50;

0 comments on commit a616eb9

Please sign in to comment.