default: {
    argTypes: {
        alert: {
            control: {
                type: "object";
            };
            defaultValue: {
                cancelText: string;
                confirmText: string;
                description: string;
                title: string;
                type: string;
            };
        };
        onCancel: {};
        onConfirm: {
            action: string;
        };
        trigger: {
            control: {
                type: "object";
            };
            defaultValue: {
                disabled: boolean;
                icon: null;
                size: string;
                text: string;
                variant: string;
            };
        };
    };
    component: ((props: CustomAlertProps) => Element);
    parameters: {
        layout: string;
    };
    tags: string[];
    title: string;
} = ...

CustomAlert 컴포넌트는 사용자 정의 알림 대화 상자를 생성합니다. 이 컴포넌트는 트리거 버튼을 클릭하면 나타나는 알림 대화 상자를 포함합니다.

Type declaration

  • argTypes: {
        alert: {
            control: {
                type: "object";
            };
            defaultValue: {
                cancelText: string;
                confirmText: string;
                description: string;
                title: string;
                type: string;
            };
        };
        onCancel: {};
        onConfirm: {
            action: string;
        };
        trigger: {
            control: {
                type: "object";
            };
            defaultValue: {
                disabled: boolean;
                icon: null;
                size: string;
                text: string;
                variant: string;
            };
        };
    }
    • alert: {
          control: {
              type: "object";
          };
          defaultValue: {
              cancelText: string;
              confirmText: string;
              description: string;
              title: string;
              type: string;
          };
      }
      • control: {
            type: "object";
        }
        • type: "object"
      • defaultValue: {
            cancelText: string;
            confirmText: string;
            description: string;
            title: string;
            type: string;
        }
        • cancelText: string
        • confirmText: string
        • description: string
        • title: string
        • type: string
    • onCancel: {}
      • onConfirm: {
            action: string;
        }
        • action: string
      • trigger: {
            control: {
                type: "object";
            };
            defaultValue: {
                disabled: boolean;
                icon: null;
                size: string;
                text: string;
                variant: string;
            };
        }
        • control: {
              type: "object";
          }
          • type: "object"
        • defaultValue: {
              disabled: boolean;
              icon: null;
              size: string;
              text: string;
              variant: string;
          }
          • disabled: boolean
          • icon: null
          • size: string
          • text: string
          • variant: string
    • component: ((props: CustomAlertProps) => Element)
        • (props): Element
        • Parameters

          Returns Element

          사용자 정의 알림 대화 상자 컴포넌트

          CustomAlert 컴포넌트는 사용자 정의 알림 대화 상자를 생성합니다. 이 컴포넌트는 트리거 버튼을 클릭하면 나타나는 알림 대화 상자를 포함합니다.

          <CustomAlert
          trigger={{ text: 'Delete', variant: 'destructive' }}
          alert={{ title: 'Are you sure?', description: 'This action cannot be undone.', type: 'warning' }}
          onConfirm={() => console.log('Confirmed')}
          onCancel={() => console.log('Cancelled')}
          />
    • parameters: {
          layout: string;
      }
      • layout: string
    • tags: string[]
    • title: string