UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

2 lines (1 loc) 715 B
import{jsxs as e,jsx as t}from"react/jsx-runtime";import"react";import o from"../../hooks/__internal__/useLocale/useLocale.js";import{StyledBatchSelection as a,StyledSelectionCount as n}from"./batch-selection.style.js";import l from"./__internal__/batch-selection.context.js";const r=({disabled:r=!1,children:c,colorTheme:i="transparent",selectedCount:d,hidden:s,"data-element":m,"data-role":h})=>{const b=o();return e(a,{colorTheme:i,"data-component":"batch-selection","data-element":m,"data-role":h,disabled:r,hidden:s,children:[t(n,{"data-element":"selection-count",children:b.batchSelection.selected(d)}),t(l.Provider,{value:{batchSelectionDisabled:r},children:c})]})};export{r as BatchSelection,r as default};