-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update styles of form inputs (#1914)
* Update styles of form inputs * update token info form * update demo values * fix preset for sepolia * update screenshots
- Loading branch information
Showing
96 changed files
with
284 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-1 Byte
(100%)
...FormControl.pw.tsx_dark-color-mode_floating-label-size-lg-dark-mode-empty-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-240 Bytes
(95%)
...ntrol.pw.tsx_dark-color-mode_floating-label-size-md-dark-mode-empty-error-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-276 Bytes
(93%)
...ntrol.pw.tsx_dark-color-mode_floating-label-size-md-dark-mode-empty-error-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-650 Bytes
(83%)
...l.pw.tsx_dark-color-mode_floating-label-size-md-dark-mode-filled-disabled-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-341 Bytes
(92%)
...trol.pw.tsx_dark-color-mode_floating-label-size-md-dark-mode-filled-error-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.94 KB
....pw.tsx_dark-color-mode_floating-label-size-md-dark-mode-filled-read-only-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...shots__/FormControl.pw.tsx_default_floating-label-size-lg-dark-mode-empty-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-697 Bytes
(82%)
...rmControl.pw.tsx_default_floating-label-size-md-dark-mode-filled-disabled-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.92 KB
...mControl.pw.tsx_default_floating-label-size-md-dark-mode-filled-read-only-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import type { StyleFunctionProps } from '@chakra-ui/theme-tools'; | ||
import { mode, transparentize } from '@chakra-ui/theme-tools'; | ||
|
||
export default function getFormStyles(props: StyleFunctionProps) { | ||
return { | ||
input: { | ||
empty: { | ||
// there is no text in the empty input | ||
// color: ???, | ||
bgColor: props.bgColor || mode('white', 'black')(props), | ||
borderColor: mode('gray.100', 'gray.700')(props), | ||
}, | ||
hover: { | ||
color: mode('gray.800', 'gray.50')(props), | ||
bgColor: props.bgColor || mode('white', 'black')(props), | ||
borderColor: mode('gray.200', 'gray.500')(props), | ||
}, | ||
focus: { | ||
color: mode('gray.800', 'gray.50')(props), | ||
bgColor: props.bgColor || mode('white', 'black')(props), | ||
borderColor: mode('blue.400', 'blue.400')(props), | ||
}, | ||
filled: { | ||
color: mode('gray.800', 'gray.50')(props), | ||
bgColor: props.bgColor || mode('white', 'black')(props), | ||
borderColor: mode('gray.300', 'gray.600')(props), | ||
}, | ||
readOnly: { | ||
color: mode('gray.800', 'gray.50')(props), | ||
bgColor: mode('gray.200', 'gray.800')(props), | ||
borderColor: mode('gray.200', 'gray.800')(props), | ||
}, | ||
// we use opacity to show the disabled state | ||
disabled: { | ||
opacity: 0.2, | ||
}, | ||
error: { | ||
color: mode('gray.800', 'gray.50')(props), | ||
bgColor: props.bgColor || mode('white', 'black')(props), | ||
borderColor: mode('red.500', 'red.500')(props), | ||
}, | ||
}, | ||
placeholder: { | ||
'default': { | ||
color: mode('gray.500', 'gray.500')(props), | ||
}, | ||
disabled: { | ||
color: transparentize('gray.500', 0.2)(props.theme), | ||
}, | ||
error: { | ||
color: mode('red.500', 'red.500')(props), | ||
}, | ||
}, | ||
}; | ||
} |
Oops, something went wrong.