Commit 2b5fe6f2 authored by isstuev's avatar isstuev

disabled prop -> isDisabled

parent da89aef3
......@@ -28,7 +28,7 @@ import TestApp from 'playwright/TestApp';
test('disabled', async({ mount }) => {
const component = await mount(
<TestApp>
<Button variant={ variant } colorScheme={ colorScheme } disabled>Click me</Button>
<Button variant={ variant } colorScheme={ colorScheme } isDisabled>Click me</Button>
</TestApp>,
);
await expect(component.locator('button')).toHaveScreenshot();
......
......@@ -101,7 +101,7 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<FormControl variant="floating" id="address">
<Input
{ ...field }
disabled={ true }
isDisabled={ true }
/>
<FormLabel data-in-modal="true">Auto-generated API key token</FormLabel>
</FormControl>
......@@ -147,7 +147,7 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<Button
size="lg"
type="submit"
disabled={ !isDirty }
isDisabled={ !isDirty }
isLoading={ mutation.isLoading }
>
{ data ? 'Save' : 'Generate API key' }
......
......@@ -174,7 +174,7 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<Button
size="lg"
type="submit"
disabled={ !isDirty }
isDisabled={ !isDirty }
isLoading={ mutation.isLoading }
>
{ data ? 'Save' : 'Create custom ABI' }
......
......@@ -113,7 +113,7 @@ const ApiKeysPage: React.FC = () => {
<Button
size="lg"
onClick={ apiKeyModalProps.onOpen }
disabled={ !canAdd }
isDisabled={ !canAdd }
>
Add API key
</Button>
......
......@@ -124,7 +124,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<Button
size="lg"
type="submit"
disabled={ !isDirty }
isDisabled={ !isDirty }
isLoading={ pending }
>
{ data ? 'Save changes' : 'Add tag' }
......
......@@ -123,7 +123,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
<Button
size="lg"
type="submit"
disabled={ !isDirty }
isDisabled={ !isDirty }
isLoading={ pending }
>
{ data ? 'Save changes' : 'Add tag' }
......
......@@ -236,7 +236,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
<Button
size="lg"
type="submit"
disabled={ !isDirty }
isDisabled={ !isDirty }
isLoading={ mutation.isLoading }
>
Send request
......
......@@ -72,7 +72,7 @@ const DeleteModal: React.FC<Props> = ({
onClick={ onDeleteClick }
isLoading={ mutation.isLoading }
// FIXME: chackra's button is disabled when isLoading
disabled={ false }
isDisabled={ false }
>
Delete
</Button>
......
......@@ -25,7 +25,7 @@ const Pagination = ({ page, onNextPageClick, onPrevPageClick, resetPage, hasNext
variant="outline"
size="sm"
onClick={ resetPage }
disabled={ page === 1 }
isDisabled={ page === 1 }
mr={ 4 }
>
First
......@@ -38,7 +38,7 @@ const Pagination = ({ page, onNextPageClick, onPrevPageClick, resetPage, hasNext
w="36px"
icon={ <Icon as={ arrowIcon } w={ 5 } h={ 5 }/> }
mr={ 3 }
disabled={ !canGoBackwards || page === 1 }
isDisabled={ !canGoBackwards || page === 1 }
/>
<Button
variant="outline"
......@@ -59,7 +59,7 @@ const Pagination = ({ page, onNextPageClick, onPrevPageClick, resetPage, hasNext
w="36px"
icon={ <Icon as={ arrowIcon } w={ 5 } h={ 5 } transform="rotate(180deg)"/> }
ml={ 3 }
disabled={ !hasNextPage }
isDisabled={ !hasNextPage }
/>
{ /* not implemented yet */ }
{ /* <Flex alignItems="center" width="132px" ml={ 16 } display={{ base: 'none', lg: 'flex' }}>
......
......@@ -32,7 +32,7 @@ const PrevNext = ({ className, onClick, prevLabel, nextLabel, isPrevDisabled, is
variant="subtle"
colorScheme="gray"
onClick={ handelPrevClick }
disabled={ isPrevDisabled }
isDisabled={ isPrevDisabled }
/>
</Tooltip>
<Tooltip label={ nextLabel }>
......@@ -45,7 +45,7 @@ const PrevNext = ({ className, onClick, prevLabel, nextLabel, isPrevDisabled, is
colorScheme="gray"
ml="10px"
onClick={ handelNextClick }
disabled={ isNextDisabled }
isDisabled={ isNextDisabled }
/>
</Tooltip>
</Box>
......
......@@ -192,7 +192,7 @@ const AddressForm: React.FC<Props> = ({ data, onSuccess, setAlertVisible, isAdd
size="lg"
type="submit"
isLoading={ pending }
disabled={ !isDirty }
isDisabled={ !isDirty }
>
{ !isAdd ? 'Save changes' : 'Add address' }
</Button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment