Commit 2b5fe6f2 authored by isstuev's avatar isstuev

disabled prop -> isDisabled

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