Skip to content

Commit

Permalink
chore: move styles to a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-golovanov committed Nov 25, 2024
1 parent 6424e5d commit 89a5f23
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 57 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from "react";

import { Button } from "@appsmith/ads";
import NoResponseSVG from "assets/images/no-response.svg";
import { EMPTY_RESPONSE_RUN } from "ee/constants/messages";

import * as Styled from "./styles";

interface NoResponseProps {
isRunDisabled: boolean;
isRunning: boolean;
onRunClick: () => void;
}

export const NoResponse = ({
isRunDisabled,
isRunning,
onRunClick,
}: NoResponseProps) => (
<Styled.Container>
<img alt="no-response-yet" src={NoResponseSVG} />
<Styled.RunGroup>
<Styled.Text>{EMPTY_RESPONSE_RUN()}</Styled.Text>
<Button
isDisabled={isRunDisabled}
isLoading={isRunning}
onClick={onRunClick}
size="sm"
>
Run
</Button>
</Styled.RunGroup>
</Styled.Container>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { NoResponse } from "./NoResponse";
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import styled from "styled-components";
import { Text as AdsText } from "@appsmith/ads";

import { TAB_BAR_HEIGHT } from "../constants";

export const Text = styled(AdsText)`
&&&& {
margin-top: 0;
}
`;

export const Container = styled.div`
width: 100%;
height: calc(100% - ${TAB_BAR_HEIGHT}px);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 24px;
`;

export const RunGroup = styled.div`
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
`;

0 comments on commit 89a5f23

Please sign in to comment.