액션 · SINCE v0.1.0
ConfirmActionRow — 취소와 확인의 로딩 충돌을 막는 ConfirmActionRow
취소·확인 버튼, destructive 변형과 양쪽 로딩 상호 배제를 제공하는 Expo·React Native 확인 액션 행입니다.
ConfirmActionRow 사용 시점과 역할
ConfirmActionRow는 Provider의 cancel과 confirm 문자열을 기본 라벨로 사용하고 두 Button을 같은 너비로 배치합니다. 확인이 로딩 중이면 취소를, 취소가 로딩 중이면 확인을 비활성화해 중복 작업을 막습니다.
- onCancel과 onConfirm이 필수인 두 버튼 구조
- destructive 슈가와 개별 cancelVariant·confirmVariant
- loading과 cancelLoading 사이의 교차 비활성화
설치와 최소 예제
ConfirmActionRow: 패키지 루트 엔트리에서 import한 뒤 앱이 소유한 상태와 이벤트를 연결하세요.
TypeScript
pnpm add @gj-kit/expo-ui
import { ConfirmActionRow } from '@gj-kit/expo-ui';
<ConfirmActionRow destructive loading={deleting} onCancel={close} onConfirm={remove} />접근성과 플랫폼 동작
각 액션은 Button의 button 역할, busy·disabled 상태와 Provider 라벨을 그대로 사용합니다. destructive는 색상만이 아니라 확인 문구와 Dialog 설명으로 결과를 함께 알려야 합니다.
기본 스타일은 현재 UiProvider 테마의 color, spacing, radius, typography, metric 역할에서 파생됩니다. Expo, bare React Native와 React Native Web에서 같은 prop 계약을 사용합니다.