| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/elite-events-storybook/ |
Upload File : |
"use strict";(self.webpackChunkelite_events_nextjs=self.webpackChunkelite_events_nextjs||[]).push([[6364],{"./src/components/ui/ErrorMessage.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AllScenarios:()=>AllScenarios,CustomMessage:()=>CustomMessage,CustomTitle:()=>CustomTitle,Default:()=>Default,FormValidationError:()=>FormValidationError,NetworkError:()=>NetworkError,NotFound:()=>NotFound,ServerError:()=>ServerError,WithRetry:()=>WithRetry,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/next/dist/compiled/react/jsx-runtime.js"),_ErrorMessage__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/ui/ErrorMessage.tsx"),console=__webpack_require__("./node_modules/console-browserify/index.js");const __WEBPACK_DEFAULT_EXPORT__={title:"UI/ErrorMessage",component:_ErrorMessage__WEBPACK_IMPORTED_MODULE_1__.A,parameters:{layout:"padded"},tags:["autodocs"]},Default={},CustomMessage={args:{message:"Failed to load products. Please check your internet connection."}},CustomTitle={args:{title:"Connection Error",message:"Unable to connect to the server"}},WithRetry={args:{message:"Failed to load data",onRetry:()=>alert("Retry clicked!")}},NetworkError={args:{title:"Network Error",message:"Please check your internet connection and try again",onRetry:()=>console.log("Retrying...")}},NotFound={args:{title:"404 - Not Found",message:"The page you are looking for does not exist"}},ServerError={args:{title:"500 - Server Error",message:"Something went wrong on our end. Please try again later.",onRetry:()=>console.log("Retrying...")}},FormValidationError={args:{title:"Validation Error",message:"Please fill in all required fields before submitting"}},AllScenarios={render:()=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"space-y-8",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Network Error"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessage__WEBPACK_IMPORTED_MODULE_1__.A,{title:"Network Error",message:"Unable to connect to the server",onRetry:()=>console.log("Retry")})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Not Found"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessage__WEBPACK_IMPORTED_MODULE_1__.A,{title:"404 - Not Found",message:"The requested resource could not be found"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Permission Denied"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessage__WEBPACK_IMPORTED_MODULE_1__.A,{title:"Access Denied",message:"You don't have permission to access this resource"})]})]}),parameters:{docs:{description:{story:"Different error scenarios"}}}},__namedExportsOrder=["Default","CustomMessage","CustomTitle","WithRetry","NetworkError","NotFound","ServerError","FormValidationError","AllScenarios"]},"./src/components/ui/ErrorMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>ErrorMessage});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/next/dist/compiled/react/jsx-runtime.js"),_components_ui_icons__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/ui/icons/index.ts"),_components_ui_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/ui/Button/index.tsx");function ErrorMessage({message="An error occurred while loading this content",title="Error",onRetry}){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-6 text-center",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:"text-red-600 dark:text-red-400 mb-3",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_icons__WEBPACK_IMPORTED_MODULE_1__.In,{name:"alert-circle",className:"w-12 h-12 mx-auto"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3",{className:"text-lg font-semibold text-red-700 dark:text-red-300 mb-2",children:title}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p",{className:"text-red-600 dark:text-red-400 mb-4",children:message}),onRetry&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ui_Button__WEBPACK_IMPORTED_MODULE_2__.$,{onClick:onRetry,variant:"danger",size:"md",children:"Try Again"})]})}}}]);