Rewrite old useStyles2 pattern to use new pattern (#76136)

* Rewrite old useStyles2 pattern to use new pattern

* fix lint from used imports
This commit is contained in:
Josh Hunt
2023-10-09 09:49:08 +00:00
committed by GitHub
parent d3f69fd34a
commit 07266aa983
23 changed files with 37 additions and 58 deletions

View File

@@ -35,7 +35,7 @@ export const RolePickerInput = ({
onQueryChange,
...rest
}: InputProps): JSX.Element => {
const styles = useStyles2((theme) => getRolePickerInputStyles(theme, false, !!isFocused, !!disabled, false));
const styles = useStyles2(getRolePickerInputStyles, false, !!isFocused, !!disabled, false);
const inputRef = useRef<HTMLInputElement | null>(null);
useEffect(() => {

View File

@@ -25,7 +25,7 @@ export const UpgradeBox = ({
size = 'md',
...htmlProps
}: Props) => {
const styles = useStyles2((theme) => getUpgradeBoxStyles(theme, size));
const styles = useStyles2(getUpgradeBoxStyles, size);
useEffect(() => {
reportExperimentView(`feature-highlights-${featureId}`, 'test', eventVariant);