Skip to content

Commit

Permalink
enhance(frontend): add tooltip to clear buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ardaerzin committed Feb 4, 2025
1 parent 1e9e069 commit d185f11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {memo, useCallback} from "react"

import clsx from "clsx"
import {Button, Typography} from "antd"
import {Button, Tooltip, Typography} from "antd"

import RunButton from "../../../assets/RunButton"
import LoadTestsetButton from "../../Modals/LoadTestsetModal/assets/LoadTestsetButton"
Expand Down Expand Up @@ -37,9 +37,11 @@ const GenerationComparisonHeader = ({className}: GenerationComparisonHeaderProps
<Typography className={classes.heading}>Generations</Typography>

<div className="flex items-center gap-2">
<Button size="small" onClick={clearGeneration}>
Clear
</Button>
<Tooltip title="Clear all">
<Button size="small" onClick={clearGeneration}>
Clear
</Button>
</Tooltip>
<LoadTestsetButton label="Load test set" />
<RunButton isRunAll type="primary" onClick={() => runTests?.()} />
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {useCallback} from "react"

import {Button, Typography} from "antd"
import {Button, Tooltip, Typography} from "antd"
import clsx from "clsx"

import usePlayground from "@/components/NewPlayground/hooks/usePlayground"
Expand Down Expand Up @@ -82,9 +82,11 @@ const GenerationHeader = ({variantId}: GenerationHeaderProps) => {
</Typography>

<div className="flex items-center gap-2">
<Button size="small" onClick={clearGeneration} disabled={isRunning}>
Clear
</Button>
<Tooltip title="Clear all">
<Button size="small" onClick={clearGeneration} disabled={isRunning}>
Clear
</Button>
</Tooltip>

<LoadTestsetButton label="Load test set" variantId={variantId} />

Expand Down

0 comments on commit d185f11

Please sign in to comment.