import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { StyledFloatingButton, StyledAlertIcon, StyledCircleWrap, StyledCircle, IconBox, } from './StyledFloatingButton'; import ButtonUploadIcon from '../../../../public/images/button.upload.react.svg'; import ButtonFileIcon from '../../../../public/images/button.file.react.svg'; import ButtonTrashIcon from '../../../../public/images/button.trash.react.svg'; import ButtonMoveIcon from '../../../../public/images/button.move.react.svg'; import ButtonDuplicateIcon from '../../../../public/images/button.duplicate.react.svg'; import ButtonAlertIcon from '../../../../public/images/button.alert.react.svg'; import commonIconsStyles from '@appserver/components/utils/common-icons-style'; import ButtonPlusIcon from '../../../../public/images/actions.button.plus.react.svg'; import ButtonMinusIcon from '../../../../public/images/actions.button.minus.react.svg'; const StyledButtonAlertIcon = styled(ButtonAlertIcon)` ${commonIconsStyles} `; const FloatingButton = ({ id, className, style, ...rest }) => { const { icon, alert, percent, onClick, color } = rest; return (
{icon == 'upload' ? ( ) : icon == 'file' ? ( ) : icon == 'trash' ? ( ) : icon == 'move' ? ( ) : icon == 'plus' ? ( ) : icon == 'minus' ? ( ) : ( )} {alert ? : <>}
); }; FloatingButton.propTypes = { id: PropTypes.string, className: PropTypes.string, style: PropTypes.object, icon: PropTypes.oneOf(['upload', 'file', 'trash', 'move', 'duplicate', 'plus', 'minus']), alert: PropTypes.bool, percent: PropTypes.number, onClick: PropTypes.func, color: PropTypes.string, }; FloatingButton.defaultProps = { id: undefined, className: undefined, style: undefined, icon: 'upload', alert: false, percent: 0, }; export default FloatingButton;