From bd2b3acebdd0d6623455b235a823501c239de495 Mon Sep 17 00:00:00 2001 From: HarunaMahjong Date: Wed, 29 May 2024 13:27:11 +0900 Subject: [PATCH] 02-04 --- .../04-actions/01-actions/README.md | 27 ++++++++++--------- .../02-adding-parameters-to-actions/README.md | 12 ++++----- .../02-advanced-svelte/04-actions/meta.json | 2 +- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/content/tutorial/02-advanced-svelte/04-actions/01-actions/README.md b/content/tutorial/02-advanced-svelte/04-actions/01-actions/README.md index 7f810312..1e8b31b7 100644 --- a/content/tutorial/02-advanced-svelte/04-actions/01-actions/README.md +++ b/content/tutorial/02-advanced-svelte/04-actions/01-actions/README.md @@ -1,17 +1,17 @@ --- -title: The use directive +title: Use 지시어 --- -Actions are essentially element-level lifecycle functions. They're useful for things like: +액션은 본질적으로 요소 수준의 생명주기 함수입니다. 다음과 같은 경우에 유용합니다: -- interfacing with third-party libraries -- lazy-loaded images -- tooltips -- adding custom event handlers +- 서드파티 라이브러리와의 인터페이스 +- 지연 로드된 이미지 +- 툴팁 +- 사용자 정의 이벤트 핸들러 추가 -In this app, you can scribble on the ``, and change colours and brush size via the menu. But if you open the menu and cycle through the options with the Tab key, you'll soon find that the focus isn't _trapped_ inside the modal. +이 앱에서는 ``에 낙서를 하고 메뉴를 통해 색상과 브러시 크기를 변경할 수 있습니다. 하지만 메뉴를 열고 Tab 키로 옵션을 순환하면 포커스가 모달 내부에 _갇히지_ 않는 것을 곧 알게 될 것입니다. -We can fix that with an action. Import `trapFocus` from `actions.js`... +이 문제를 액션으로 해결할 수 있습니다. `actions.js`에서 `trapFocus`를 가져옵시다. ```svelte /// file: App.svelte @@ -27,16 +27,16 @@ We can fix that with an action. Import `trapFocus` from `actions.js`... ``` -...then add it to the menu with the `use:` directive: +그런 다음 `use:` 지시어를 사용하여 메뉴에 추가합시다. ```svelte /// file: App.svelte