aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/generativeFill/GenerativeFillButtons.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2025-03-04 04:32:50 -0500
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2025-03-04 04:32:50 -0500
commit95abdada5a275fc258fa72781f7f3c40c0b306ea (patch)
tree6d729cebe0937ae81108005de9895b5398d1f475 /src/client/views/nodes/generativeFill/GenerativeFillButtons.tsx
parent0a8f3739cf5c30852f18751a4c05d81e0dabe928 (diff)
parent215ad40efa2e343e290d18bffbc55884829f1a0d (diff)
Merge branch 'master' of https://github.com/brown-dash/Dash-Web into Merge
Diffstat (limited to 'src/client/views/nodes/generativeFill/GenerativeFillButtons.tsx')
-rw-r--r--src/client/views/nodes/generativeFill/GenerativeFillButtons.tsx72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/client/views/nodes/generativeFill/GenerativeFillButtons.tsx b/src/client/views/nodes/generativeFill/GenerativeFillButtons.tsx
deleted file mode 100644
index fe22b273d..000000000
--- a/src/client/views/nodes/generativeFill/GenerativeFillButtons.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import './GenerativeFillButtons.scss';
-import * as React from 'react';
-import ReactLoading from 'react-loading';
-import { Button, IconButton, Type } from 'browndash-components';
-import { AiOutlineInfo } from 'react-icons/ai';
-import { activeColor } from './generativeFillUtils/generativeFillConstants';
-
-interface ButtonContainerProps {
- onClick: () => Promise<void>;
- loading: boolean;
- onReset: () => void;
-}
-
-export function EditButtons({ loading, onClick: getEdit, onReset }: ButtonContainerProps) {
- return (
- <div className="generativeFillBtnContainer">
- <Button text="RESET" type={Type.PRIM} color={activeColor} onClick={onReset} />
- {loading ? (
- <Button
- text="GET EDITS"
- type={Type.TERT}
- color={activeColor}
- icon={<ReactLoading type="spin" color="#ffffff" width={20} height={20} />}
- iconPlacement="right"
- onClick={() => {
- if (!loading) getEdit();
- }}
- />
- ) : (
- <Button
- text="GET EDITS"
- type={Type.TERT}
- color={activeColor}
- onClick={() => {
- if (!loading) getEdit();
- }}
- />
- )}
- <IconButton type={Type.SEC} color={activeColor} tooltip="Open Documentation" icon={<AiOutlineInfo size="16px" />} onClick={() => window.open('https://brown-dash.github.io/Dash-Documentation/features/generativeai/#editing', '_blank')} />
- </div>
- );
-}
-
-export function CutButtons({ loading, onClick: cutImage, onReset }: ButtonContainerProps) {
- return (
- <div className="generativeFillBtnContainer">
- <Button text="RESET" type={Type.PRIM} color={activeColor} onClick={onReset} />
- {loading ? (
- <Button
- text="CUT IMAGE"
- type={Type.TERT}
- color={activeColor}
- icon={<ReactLoading type="spin" color="#ffffff" width={20} height={20} />}
- iconPlacement="right"
- onClick={() => {
- if (!loading) cutImage();
- }}
- />
- ) : (
- <Button
- text="CUT IMAGE"
- type={Type.TERT}
- color={activeColor}
- onClick={() => {
- if (!loading) cutImage();
- }}
- />
- )}
- <IconButton type={Type.SEC} color={activeColor} tooltip="Open Documentation" icon={<AiOutlineInfo size="16px" />} onClick={() => window.open('https://brown-dash.github.io/Dash-Documentation/features/generativeai/#editing', '_blank')} />
- </div>
- );
-}