UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

60 lines (59 loc) 2.02 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true, }); Object.defineProperty(exports, 'FileEmptyCard', { enumerable: true, get: function () { return FileEmptyCard; }, }); const _interop_require_default = require('@swc/helpers/_/_interop_require_default'); const _interop_require_wildcard = require('@swc/helpers/_/_interop_require_wildcard'); const _react = /*#__PURE__*/ _interop_require_wildcard._(require('react')); const _index = require('../../utils/index.js'); const _classnames = /*#__PURE__*/ _interop_require_default._( require('classnames'), ); const _FileUploadCard = require('./FileUploadCard.js'); const FileEmptyCardIcon = _index.polymorphic.span('iui-file-card-empty-icon', { children: _react.createElement(_index.SvgUpload, null), }); if ('development' === process.env.NODE_ENV) FileEmptyCardIcon.displayName = 'FileEmptyCard.Icon'; const FileEmptyCardText = _index.polymorphic.span('iui-file-card-empty-action'); if ('development' === process.env.NODE_ENV) FileEmptyCardText.displayName = 'FileEmptyCard.Text'; const FileEmptyCardComponent = _react.forwardRef((props, ref) => { let { children, className, ...rest } = props; return _react.createElement( _index.Box, { className: (0, _classnames.default)('iui-file-card-empty', className), ref: ref, ...rest, }, children ?? _react.createElement( _react.Fragment, null, _react.createElement(FileEmptyCard.Icon, null), _react.createElement( FileEmptyCard.Text, null, _react.createElement( _FileUploadCard.FileUploadCard.InputLabel, null, 'Choose a file', ), _react.createElement('div', null, 'to upload.'), ), ), ); }); if ('development' === process.env.NODE_ENV) FileEmptyCardComponent.displayName = 'FileEmptyCard'; const FileEmptyCard = Object.assign(FileEmptyCardComponent, { Icon: FileEmptyCardIcon, Text: FileEmptyCardText, });