1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- import styled, { css } from 'styled-components';
- export const IconWrapper = styled('div')<{
- isHover: boolean;
- isDisabled?: boolean;
- }>`
- position: relative;
- display: inline-flex;
- outline: none;
- width: auto;
- height: auto;
- align-items: center;
- justify-content: center;
- opacity: ${(props) => (props.isDisabled ? 0.7 : 1)};
- ${(props) =>
- props.isDisabled
- ? css`
- [data-status='normal'] {
- opacity: 0.6;
- cursor: default;
- }
- [data-status='hover'] {
- opacity: 0;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- }
- [data-status='active'] {
- opacity: 0;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- }
- `
- : css`
- cursor: pointer;
- [data-status='normal'] {
- opacity: 1;
- transition-delay: 100ms;
- }
- [data-status='hover'] {
- transition-delay: 100ms;
- opacity: 0;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- }
- [data-status='active'] {
- transition-delay: 100ms;
- opacity: 1;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- }
- ${props.isHover
- ? css`
- :hover {
- [data-status='hover'] {
- opacity: 1;
- }
- [data-status='normal'] {
- opacity: 0;
- }
- }
- `
- : null}
- `}
- `;
- export const ClickZone = styled.div`
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- width: 100%;
- height: 100%;
- outline: none;
- z-index: 10;
- `;
|