Added unused imports and vars and fixed lint (#929)

This commit is contained in:
Lucas Bordeau
2023-07-26 02:18:25 +02:00
committed by GitHub
parent c0700c9b20
commit b52745533a
17 changed files with 89 additions and 27 deletions

View File

@ -76,7 +76,7 @@ const StyledButton = styled.button<
}
}};
border-style: solid;
border-width: ${({ theme, variant, position }) => {
border-width: ${({ variant, position }) => {
switch (variant) {
case 'primary':
case 'secondary':

View File

@ -117,7 +117,6 @@ const StyledIconButton = styled.button<
export function IconButton({
icon,
title,
variant = 'transparent',
size = 'medium',
textColor = 'tertiary',

View File

@ -140,7 +140,7 @@ export function EditableField({
transition={{ duration: 0.1 }}
whileHover={{ scale: 1.04 }}
>
<EditableFieldEditButton customHotkeyScope={customEditHotkeyScope} />
<EditableFieldEditButton />
</motion.div>
)}
</EditableFieldBaseContainer>

View File

@ -1,7 +1,6 @@
import styled from '@emotion/styled';
import { IconButton } from '@/ui/button/components/IconButton';
import { HotkeyScope } from '@/ui/hotkey/types/HotkeyScope';
import { IconPencil } from '@/ui/icon';
import { overlayBackground } from '@/ui/themes/effects';
@ -26,11 +25,7 @@ export const StyledEditableFieldEditButton = styled.div`
${overlayBackground}
`;
type OwnProps = {
customHotkeyScope?: HotkeyScope;
};
export function EditableFieldEditButton({ customHotkeyScope }: OwnProps) {
export function EditableFieldEditButton() {
const { openEditableField } = useEditableField();
function handleClick() {

View File

@ -27,7 +27,7 @@ type OwnProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> & {
const StyledContainer = styled.div<Pick<OwnProps, 'fullWidth'>>`
display: flex;
flex-direction: column;
width: ${({ fullWidth, theme }) => (fullWidth ? `100%` : 'auto')};
width: ${({ fullWidth }) => (fullWidth ? `100%` : 'auto')};
`;
const StyledLabel = styled.span`

View File

@ -19,9 +19,10 @@ export const snackBarInternalState = atom<SnackBarState>({
},
});
// TODO: use a recoil callback
export const snackBarSetQueueState = selector<SnackBarOptions | null>({
key: 'snackBarQueueState',
get: ({ get }) => null, // We don't care about getting the value
get: ({ get: _get }) => null, // We don't care about getting the value
set: ({ set }, newValue) =>
set(snackBarInternalState, (prev) => {
if (prev.queue.length >= prev.maxQueue) {

View File

@ -1,4 +1,3 @@
import React from 'react';
import styled from '@emotion/styled';
import { Checkbox } from '@/ui/input/components/Checkbox';
@ -19,7 +18,8 @@ export const SelectAllCheckbox = () => {
const checked = allRowsSelectedStatus === 'all';
const indeterminate = allRowsSelectedStatus === 'some';
function onChange(value: boolean) {
function onChange() {
selectAllRows();
}

View File

@ -36,7 +36,6 @@ export function EditableCellDoubleTextEditMode({
secondValue,
firstValuePlaceholder,
secondValuePlaceholder,
onChange,
onSubmit,
onCancel,
}: OwnProps) {

View File

@ -7,20 +7,16 @@ import { EditableCell } from '../components/EditableCell';
type OwnProps = {
placeholder?: string;
value: string;
onChange?: (newValue: string) => void;
editModeHorizontalAlign?: 'left' | 'right';
loading?: boolean;
onSubmit?: (newText: string) => void;
onCancel?: () => void;
};
export function EditableCellText({
value,
placeholder,
onChange,
editModeHorizontalAlign,
loading,
onCancel,
onSubmit,
}: OwnProps) {
return (