DocSpace-client/packages/components/form-wrapper/index.js

43 lines
992 B
JavaScript
Raw Normal View History

2022-07-25 16:27:34 +00:00
import React from "react";
import styled from "styled-components";
import { tablet, hugeMobile } from "@docspace/components/utils/device";
2022-07-25 16:27:34 +00:00
import Base from "../themes/base";
2022-07-25 16:27:34 +00:00
const StyledWrapper = styled.div`
display: flex;
flex-direction: column;
align-items: center;
padding: 32px;
background: ${(props) => props.theme.formWrapper.background};
box-shadow: ${(props) => props.theme.formWrapper.boxShadow};
2022-07-25 16:27:34 +00:00
border-radius: 12px;
max-width: 320px;
2022-08-11 14:43:30 +00:00
min-width: 320px;
2022-07-25 16:27:34 +00:00
@media ${tablet} {
2022-08-11 14:17:21 +00:00
max-width: 416px;
min-width: 416px;
2022-07-25 16:27:34 +00:00
}
@media ${hugeMobile} {
padding: 0;
border-radius: 0;
2022-11-01 10:54:50 +00:00
box-shadow: none !important;
2022-08-11 14:17:21 +00:00
max-width: 343px;
min-width: 343px;
2022-11-01 10:54:50 +00:00
background: transparent !important;
2022-07-25 16:27:34 +00:00
}
`;
StyledWrapper.defaultProps = { theme: Base };
2022-07-25 16:27:34 +00:00
const FormWrapper = (props) => {
const { children } = props;
return <StyledWrapper {...props}>{children}</StyledWrapper>;
2022-07-25 16:27:34 +00:00
};
FormWrapper.defaultProps = { theme: Base };
2022-07-25 16:27:34 +00:00
export default FormWrapper;