1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import styled, { css, keyframes } from 'styled-components';
- const closeToolbar = keyframes`
- from {
- pointer-events: auto;
- opacity: 1;
- }
- to {
- opacity: 0;
- }
- `;
- export const Container = styled('div')<{
- displayMode: string;
- hidden: boolean;
- }>`
- position: fixed;
- top: 86px;
- left: ${(props) => (props.displayMode === 'normal' ? '267px' : 0)};
- right: 0;
- margin: auto;
- max-width: 572px;
- width: 100%;
- height: 54px;
- border-radius: 4px;
- box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.38);
- background-color: white;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 8px;
- z-index: 2;
- transition: all 225ms ease-in-out;
- ${(props) =>
- props.hidden
- ? css`
- animation: ${closeToolbar} 3s forwards;
- `
- : ''}
- `;
- export default Container;
|