@ozen-ui/kit
Version:
React component library
18 lines (17 loc) • 889 B
JavaScript
import { __assign, __rest } from "tslib";
import React from 'react';
import { useThemeProps } from '../../../../hooks/useThemeProps';
import { polymorphicComponentWithRef } from '../../../../utils/polymorphicComponentWithRef';
import { IconButton } from '../../../IconButtonNext';
import { useFileContext } from '../../FileContext';
import { FILE_ICON_BUTTON_DEFAULT_TAG } from './constants';
export var FileIconButton = polymorphicComponentWithRef(function (inProps, ref) {
var props = useThemeProps({
props: inProps,
name: 'FileIconButton',
});
var _a = props.as, as = _a === void 0 ? FILE_ICON_BUTTON_DEFAULT_TAG : _a, other = __rest(props, ["as"]);
var size = useFileContext().size;
return (React.createElement(IconButton, __assign({}, other, { as: as, ref: ref, size: size, compressed: true })));
});
FileIconButton.displayName = 'FileIconButton';