Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
languages
/
wp-content-20241001222009
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
packages
/
checkout
/
components
/
totals-wrapper
:
index.tsx
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import classnames from 'classnames'; import { Children, ReactNode } from 'react'; /** * Internal dependencies */ import './style.scss'; interface TotalsWrapperProps { children: ReactNode; /* If this TotalsWrapper is being used to wrap a Slot */ slotWrapper?: boolean; className?: string; } const TotalsWrapper = ( { children, slotWrapper = false, className, }: TotalsWrapperProps ): JSX.Element | null => { return Children.count( children ) ? ( <div className={ classnames( className, 'wc-block-components-totals-wrapper', { 'slot-wrapper': slotWrapper, } ) } > { children } </div> ) : null; }; export default TotalsWrapper;