Remove size from CodiconButton
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user