-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[C] refactor out WidgetContainerBlock
- Loading branch information
Showing
22 changed files
with
292 additions
and
343 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
components/content-blocks/CameraFilterTool/CameraFilterTool.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,28 @@ | ||
import { FunctionComponent } from "react"; | ||
import { BaseContentBlockProps } from "@/components/shapes"; | ||
import { useTranslation } from "@/lib/i18n/client"; | ||
import WidgetContainer from "@/components/layout/WidgetContainer"; | ||
import CameraFilterTool from "@rubin-epo/epo-widget-lib/CameraFilter"; | ||
import withModal from "@/components/hoc/withModal/withModal"; | ||
|
||
const CameraFilterToolBlock: FunctionComponent<BaseContentBlockProps> = ({ | ||
openModal, | ||
isOpen, | ||
}) => { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<WidgetContainer | ||
title={t("widgets.camera_filter_tool")} | ||
paddingSize="none" | ||
bgColor="white" | ||
{...{ openModal, isOpen }} | ||
> | ||
<CameraFilterTool /> | ||
</WidgetContainer> | ||
); | ||
}; | ||
|
||
CameraFilterToolBlock.displayName = "ContentBlock.CameraFilterTool"; | ||
|
||
export default withModal(CameraFilterToolBlock); |
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 @@ | ||
export { default } from "./CameraFilterTool"; |
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
Empty file.
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
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
9 changes: 4 additions & 5 deletions
9
components/content-blocks/InteractionGroupContainer/styles.ts
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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import styled from "styled-components"; | ||
import { green20 } from "@/styles/globalStyles"; | ||
import { fluidScale } from "@rubin-epo/epo-react-lib/styles"; | ||
|
||
export const Heading = styled.h2` | ||
padding-block-end: ${fluidScale("57px", "47px")}; | ||
margin-block-end: ${fluidScale("2em", "1.5em")}; | ||
`; | ||
export const InteractionGroup = styled.div` | ||
padding: ${fluidScale("40px", "30px")}; | ||
background-color: ${green20}; | ||
padding: ${fluidScale("2em", "1.5em")}; | ||
background-color: #e6ffe6; | ||
> section + section { | ||
margin-top: 30px; | ||
margin-top: 1.5em; | ||
} | ||
`; |
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
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
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
43 changes: 0 additions & 43 deletions
43
components/content-blocks/WidgetContainer/WidgetContainer.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
// import Modal from "./Modal"; | ||
|
||
export { default as TwoColumnContainer } from "./TwoColumnContainer"; | ||
export { default as InteractionGroupContainer } from "./InteractionGroupContainer"; | ||
export { default as Text } from "./Text"; | ||
export { default as Image } from "./Image"; | ||
export { default as Questions } from "./Questions"; | ||
export { default as WidgetContainer } from "./WidgetContainer"; | ||
export { default as BarGraphTool } from "./BarGraphTool"; | ||
export { default as ColorTool } from "./ColorTool"; | ||
export { default as FilterTool } from "./FilterTool"; | ||
export { default as ScatterplotTool } from "./ScatterplotTool"; | ||
export { default as CameraFilterTool } from "./CameraFilterTool"; |
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
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
Oops, something went wrong.