123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import {css} from '@emotion/react';
- import styled from '@emotion/styled';
- import Panel from 'sentry/components/panels/panel';
- type Props = {
-
- interactive?: boolean;
- };
- const hoverStyle = css`
- &:focus,
- &:hover {
- box-shadow: 0px 0px 0px 6px rgba(209, 202, 216, 0.2);
- outline: none;
- }
- &:active {
- box-shadow: 0px 0px 0px 6px rgba(209, 202, 216, 0.5);
- }
-
- * {
- cursor: pointer;
- }
- `;
- const Card = styled(Panel)<Props>`
- display: flex;
- align-items: stretch;
- flex-direction: column;
- transition: box-shadow 0.2s ease;
- text-align: left;
- padding: 0;
- ${p => p.interactive && 'cursor: pointer'};
- ${p => p.interactive && hoverStyle};
- `;
- export default Card;
|