Web: Components: deleted bar-banner component

This commit is contained in:
Dmitry Sychugov 2022-03-14 15:44:07 +05:00
parent 35f3111bcb
commit 79c9f3eb46
2 changed files with 0 additions and 79 deletions

View File

@ -1,47 +0,0 @@
import React, { useState } from "react";
import PropTypes from "prop-types";
import { StyledBarBanner, StyledCrossIcon } from "./styled-bar-banner";
const BarBanner = (props) => {
const { htmlLink } = props;
const [open, setOpen] = useState(true);
const onClose = () => setOpen(false);
return (
<StyledBarBanner {...props} open={open}>
{htmlLink ? (
<iframe
height="60px"
width="100%"
src={htmlLink}
frameBorder="0"
align="left"
scrolling="no"
></iframe>
) : (
""
)}
<div className="action" onClick={onClose}>
<StyledCrossIcon size="medium" />
</div>
</StyledBarBanner>
);
};
BarBanner.propTypes = {
id: PropTypes.string,
className: PropTypes.string,
style: PropTypes.object,
htmlLink: PropTypes.string,
};
BarBanner.defaultProps = {
id: undefined,
className: undefined,
style: undefined,
};
export default BarBanner;

View File

@ -1,32 +0,0 @@
import styled from "styled-components";
import CrossIcon from "../../../public/images/cross.react.svg";
import commonIconsStyles from "../utils/common-icons-style";
const StyledCrossIcon = styled(CrossIcon)`
${commonIconsStyles}
&:hover {
cursor: pointer;
}
path {
fill: #fff;
}
`;
const StyledBarBanner = styled.div`
width: 100%;
height: 100%;
display: ${(props) => (props.open ? "flex" : "none")};
justify-content: space-between;
align-items: flex-start;
position: relative;
.action {
padding: 4px;
position: absolute;
left: 98%;
}
`;
export { StyledBarBanner, StyledCrossIcon };