UNPKG

pkg-components

Version:
2 lines (1 loc) 1.08 kB
import{a,j as t}from"./jsx-runtime-DI8_P1Ft.js";import{d as _}from"./index-RGaBZlDs.js";import{g as n}from"./index-CIjh_EDQ.js";const p="_alert_6t0rd_1",u="_dot_6t0rd_23",g="_icon_6t0rd_37",y="_message_6t0rd_49",e={alert:p,dot:u,icon:g,message:y},l=({type:r,message:c})=>{const o="1px solid",i={warning:o,error:o,info:o},d={warning:"#FFC107",error:n("--color-primary-red"),info:"#0D6EFD"},m=i[r]||`${o} transparent`,s=d[r]||n("--color-icons-gray");return a("div",{className:`${e.alert} ${e[r]}`,style:{border:`${m} ${s}`},children:[a("div",{children:[t("span",{className:e.dot,style:{backgroundColor:s}}),t("div",{className:e.icon,children:t(_,{color:s,size:25})})]}),t("div",{className:e.message,style:{color:s},children:c})]})};try{l.displayName="AlertInfo",l.__docgenInfo={description:"",displayName:"AlertInfo",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"warning"'},{value:'"error"'},{value:'"info"'}]}},message:{defaultValue:null,description:"",name:"message",required:!0,type:{name:"string"}}}}}catch{}export{l as A};