-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
packages/app-form-builder/src/admin/plugins/formDetails/formSubmissions/Block.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import * as React from "react"; | ||
import styled from "@emotion/styled"; | ||
import { css } from "emotion"; | ||
import { Typography } from "@webiny/ui/Typography"; | ||
import { Elevation } from "@webiny/ui/Elevation"; | ||
|
||
const BlockWrapper = styled("div")({ | ||
backgroundColor: "var(--mdc-theme-background)", | ||
padding: "0 0 25px 0" | ||
}); | ||
|
||
const titleStyle = css({ | ||
display: "flex", | ||
alignItems: "center", | ||
".tooltip-content-wrapper": { | ||
lineHeight: "100%", | ||
svg: { | ||
height: 13, | ||
color: "var(--mdc-theme-on-surface)" | ||
} | ||
} | ||
}); | ||
|
||
const ElevationContent = styled("div")({ | ||
padding: 20 | ||
}); | ||
|
||
const Block = ({ children, title, ...props }) => { | ||
return ( | ||
<BlockWrapper {...props}> | ||
<h4> | ||
<Typography className={titleStyle} use={"overline"}> | ||
{title} | ||
</Typography> | ||
</h4> | ||
|
||
<Elevation z={2}> | ||
<ElevationContent>{children}</ElevationContent> | ||
</Elevation> | ||
</BlockWrapper> | ||
); | ||
}; | ||
|
||
export default Block; |