Skip to content

Commit 599c3f6

Browse files
SuccessButton -> TW (RooCodeInc#2289)
* migrate SuccessButton to Tailwind * changeset
1 parent 1c491bf commit 599c3f6

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

.changeset/sharp-hats-hug.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": patch
3+
---
4+
5+
SuccessButton to Tailwind

webview-ui/src/components/chat/ChatRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ import { CheckpointControls, CheckpointOverlay } from "../common/CheckpointContr
2222
import CodeAccordian, { cleanPathPrefix } from "../common/CodeAccordian"
2323
import CodeBlock, { CODE_BLOCK_BG_COLOR } from "../common/CodeBlock"
2424
import MarkdownBlock from "../common/MarkdownBlock"
25-
import SuccessButton from "../common/SuccessButton"
2625
import Thumbnails from "../common/Thumbnails"
2726
import McpResourceRow from "../mcp/McpResourceRow"
2827
import McpToolRow from "../mcp/McpToolRow"
2928
import CreditLimitError from "./CreditLimitError"
3029
import { OptionsButtons } from "./OptionsButtons"
3130
import { highlightMentions } from "./TaskHeader"
31+
import SuccessButton from "../common/SuccessButton"
3232

3333
const ChatRowContainer = styled.div`
3434
padding: 10px 6px 10px 15px;
@@ -1041,8 +1041,8 @@ export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifi
10411041
})
10421042
}}
10431043
style={{
1044-
width: "100%",
10451044
cursor: seeNewChangesDisabled ? "wait" : "pointer",
1045+
width: "100%",
10461046
}}>
10471047
<i className="codicon codicon-new-file" style={{ marginRight: 6 }} />
10481048
See new changes
Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
11
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
2-
import styled from "styled-components"
32

4-
const StyledButton = styled(VSCodeButton)`
5-
--success-button-bg: #176f2c;
6-
--success-button-hover: #197f31;
7-
--success-button-active: #156528;
3+
interface SuccessButtonTWProps extends React.ComponentProps<typeof VSCodeButton> {}
84

9-
background-color: var(--success-button-bg) !important;
10-
border-color: var(--success-button-bg) !important;
11-
color: #ffffff !important;
12-
13-
&:hover {
14-
background-color: var(--success-button-hover) !important;
15-
border-color: var(--success-button-hover) !important;
16-
}
17-
18-
&:active {
19-
background-color: var(--success-button-active) !important;
20-
border-color: var(--success-button-active) !important;
21-
}
22-
`
23-
24-
interface SuccessButtonProps extends React.ComponentProps<typeof VSCodeButton> {}
25-
26-
const SuccessButton: React.FC<SuccessButtonProps> = (props) => {
27-
return <StyledButton {...props} />
5+
const SuccessButtonTW: React.FC<SuccessButtonTWProps> = (props) => {
6+
return (
7+
<VSCodeButton
8+
{...props}
9+
className={`
10+
!bg-[#176f2c]
11+
!border-[#176f2c]
12+
!text-white
13+
hover:!bg-[#197f31]
14+
hover:!border-[#197f31]
15+
active:!bg-[#156528]
16+
active:!border-[#156528]
17+
${props.className || ""}
18+
`
19+
.replace(/\s+/g, " ")
20+
.trim()}
21+
/>
22+
)
2823
}
2924

30-
export default SuccessButton
25+
export default SuccessButtonTW

0 commit comments

Comments
 (0)