Remove size from CodiconButton

This commit is contained in:
Koen Vlaswinkel
2023-10-06 16:48:49 +02:00
parent 29aa4a3f29
commit 3b6263fb07

View File

@@ -2,14 +2,11 @@ import * as React from "react";
import { styled } from "styled-components";
import classNames from "classnames";
type Size = "x-small" | "small" | "medium" | "large" | "x-large";
const StyledButton = styled.button<{ size: Size }>`
const StyledButton = styled.button`
background: none;
color: var(--vscode-textLink-foreground);
border: none;
cursor: pointer;
font-size: ${(props) => props.size ?? "1em"};
padding: 0;
vertical-align: text-bottom;
@@ -20,14 +17,12 @@ const StyledButton = styled.button<{ size: Size }>`
`;
export const CodiconButton = ({
size,
onClick,
className,
name,
label,
disabled,
}: {
size?: Size;
onClick: (e: React.MouseEvent) => void;
className?: string;
name: string;
@@ -35,7 +30,6 @@ export const CodiconButton = ({
disabled?: boolean;
}) => (
<StyledButton
size={size}
onClick={onClick}
className={className}
disabled={disabled}