All files / src/components/common SettingsButton.tsx

0% Statements 0/8
0% Branches 0/1
0% Functions 0/1
0% Lines 0/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37                                                                         
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
import styled from "styled-components"
 
const StyledButton = styled(VSCodeButton)`
	--settings-button-bg: var(--vscode-button-secondaryBackground);
	--settings-button-hover: var(--vscode-button-secondaryHoverBackground);
	--settings-button-active: var(--vscode-button-secondaryBackground);
 
	background-color: var(--settings-button-bg) !important;
	border-color: var(--settings-button-bg) !important;
	width: 100% !important;
 
	&:hover {
		background-color: var(--settings-button-hover) !important;
		border-color: var(--settings-button-hover) !important;
	}
 
	&:active {
		background-color: var(--settings-button-active) !important;
		border-color: var(--settings-button-active) !important;
	}
 
	i.codicon {
		margin-right: 6px;
		flex-shrink: 0;
		font-size: 16px !important;
	}
`
 
interface SettingsButtonProps extends React.ComponentProps<typeof VSCodeButton> {}
 
const SettingsButton: React.FC<SettingsButtonProps> = (props) => {
	return <StyledButton appearance="secondary" {...props} />
}
 
export default SettingsButton