PromucFlow_constructor/app/client/src/pages/Applications/ForkModalStyles.ts
Kaushik Varanasi 7af0faa32e
Feature: Fork apps across orgs : fixes #3089 (#4121)
* create basic button for forking

* added menu item for fork, opens a basic modal. TODO: Add functionality to fork

* clicking fork app enables organization select and forks across applications

* added close modal functionality. TODO: add tests, optimise code, remove duplicate and use exportswhere possible

* removed unused code

* Added cypress tests to check that fork app creates an app with same dsl. Tests Failing, needs fixing

* tests fixed, but needs unexpected login from cy

* Resolved bug with login by using correct cypress selectors

* Added tests to check that dsls match, added documentation and removed unused code

* remove unused fork function and directly dispatch from modal

* refactor code

* revert

* removed unused code and refactored tests

* feature/fork-apps-across-orgs-refactor

* make code prettier

* renamed components correctly

* refactored modal code into single file. TODO: fix warnings, test and remove unused code

* pass setModalClose to dialog component to maintain global modal state

* Added types for fork modal props

* update tests and remove unused code

* Removed isDeployedApp and instead passed trigger as a prop

* remove console logs and revert imports to small case

* rename files as components

* minor changes

* cleanup

* mock dispatch for jest

* move jest mocks to component tests
2021-05-04 11:34:23 +05:30

60 lines
1.1 KiB
TypeScript

import styled from "styled-components";
import Button from "components/ads/Button";
import RadioComponent from "components/ads/Radio";
import { getTypographyByKey } from "constants/DefaultTheme";
import Dialog from "components/ads/DialogComponent";
import { Classes } from "@blueprintjs/core";
const TriggerButton = styled(Button)`
${(props) => getTypographyByKey(props, "btnLarge")}
height: 100%;
svg {
transform: rotate(-90deg);
}
`;
const StyledDialog = styled(Dialog)`
&& .${Classes.DIALOG_BODY} {
padding-top: 0px;
}
`;
const StyledRadioComponent = styled(RadioComponent)`
label {
font-size: 16px;
margin-bottom: 32px;
}
`;
const ForkButton = styled(Button)`
height: 38px;
width: 203px;
`;
const OrganizationList = styled.div`
overflow: auto;
max-height: 250px;
margin-bottom: 10px;
margin-top: 20px;
`;
const ButtonWrapper = styled.div`
display: flex;
justify-content: flex-end;
`;
const SpinnerWrapper = styled.div`
display: flex;
justify-content: center;
`;
export {
TriggerButton,
StyledDialog,
StyledRadioComponent,
ForkButton,
OrganizationList,
ButtonWrapper,
SpinnerWrapper,
};