@atlaskit/profilecard
Version:
A React component to display a card with user information.
31 lines (30 loc) • 917 B
JavaScript
/* CoverImage.tsx generated by @compiled/babel-plugin v0.36.1 */
import "./CoverImage.compiled.css";
import { ax, ix } from "@compiled/react/runtime";
import React, { useRef } from 'react';
import { Box } from '@atlaskit/primitives/compiled';
const styles = {
container: "_1reo15vq _18m915vq _1bsb1osq _4t3i1qr7 _kqswh2mm _13liglpi _qrwqglpi _1e0c1txw _1bah1h6o _4cvr1h6o",
image: "_1bsbnklw _4t3i1wug"
};
/**
* This is instead of using background-image in CSS as design-system doesn't support that
*/
export const CoverImage = ({
src,
alt = ''
}) => {
const containerRef = useRef(null);
const imgRef = useRef(null);
return /*#__PURE__*/React.createElement(Box, {
ref: containerRef,
xcss: styles.container,
backgroundColor: "color.background.neutral"
}, /*#__PURE__*/React.createElement(Box, {
as: "img",
ref: imgRef,
src: src,
alt: alt,
xcss: styles.image
}));
};