Skip to content

Commit 37dc172

Browse files
committed
Use chakra token for the placeholder color
1 parent e1ff957 commit 37dc172

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

src/chakra-components/menu.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,6 @@ export const LoadingMessage = <
151151
selectProps: { chakraStyles, size: sizeProp },
152152
} = props;
153153

154-
/**
155-
* The chakra UI global placeholder color
156-
*
157-
* @see {@link https://github.com/chakra-ui/chakra-ui/blob/13c6d2e08b61e179773be4722bb81173dd599306/packages/theme/src/styles.ts#L13}
158-
*/
159-
const color = useColorModeValue("gray.400", "whiteAlpha.400");
160-
161154
const size = useSize(sizeProp);
162155

163156
const verticalPaddings: SizeProps = {
@@ -167,7 +160,7 @@ export const LoadingMessage = <
167160
};
168161

169162
const initialSx: SystemStyleObject = {
170-
color,
163+
color: "chakra-placeholder-color",
171164
textAlign: "center",
172165
paddingY: verticalPaddings[size],
173166
fontSize: size,

src/chakra-components/placeholder.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from "react";
22
import { Box } from "@chakra-ui/layout";
33
import type { SystemStyleObject } from "@chakra-ui/system";
4-
import { useColorModeValue } from "@chakra-ui/system";
54
import type { GroupBase, PlaceholderProps } from "react-select";
65

76
const Placeholder = <
@@ -19,16 +18,9 @@ const Placeholder = <
1918
selectProps: { chakraStyles },
2019
} = props;
2120

22-
/**
23-
* The chakra UI global placeholder color
24-
*
25-
* @see {@link https://github.com/chakra-ui/chakra-ui/blob/13c6d2e08b61e179773be4722bb81173dd599306/packages/theme/src/styles.ts#L13}
26-
*/
27-
const color = useColorModeValue("gray.400", "whiteAlpha.400");
28-
2921
const initialSx: SystemStyleObject = {
3022
gridArea: "1 / 1 / 2 / 3",
31-
color,
23+
color: "chakra-placeholder-color",
3224
mx: "0.125rem",
3325
userSelect: "none",
3426
};

0 commit comments

Comments
 (0)