@bothub-chat/ui
Version:
Bothub UI Components
2 lines (1 loc) • 587 B
JavaScript
import{jsxs as r,jsx as n}from"react/jsx-runtime";import{MessageVersionsStyled as e,MessageVersionsSwitchButton as i,MessageVersionsPagination as l,MessageVersionsText as o}from"./styled.js";const t=({id:t,variant:c,version:d,totalVersions:s,onNextVersion:u,onPrevVersion:h})=>{if("number"!=typeof d||"number"!=typeof s)return null;return r(e,{$variant:c,children:[n(i,{onClick:()=>{1!==d&&(null==h||h(t))},children:"<"}),r(l,{children:[n(o,{children:d}),n(o,{children:"/"}),n(o,{children:s})]}),n(i,{onClick:()=>{d!==s&&(null==u||u(t))},children:">"})]})};export{t as MessageVersions};