-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathnative-select.js
More file actions
40 lines (39 loc) · 1.28 KB
/
native-select.js
File metadata and controls
40 lines (39 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright (c) 2025, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import {defineSlotRecipe} from '@chakra-ui/react'
// Note: Chakra v3 Native Select component is Chakra v2 Select Component.
// Native Select no longer has "filled" variant for select
// we re-created it here so it will be used app-wise for all the select component in the storefront
export default defineSlotRecipe({
variants: {
variant: {
filled: {
field: {
border: '2px solid',
borderColor: 'gray.100',
_hover: {
background: 'gray.200'
},
_readOnly: {
boxShadow: 'none !important',
userSelect: 'all'
},
_focusVisible: {
background: 'transparent',
borderColor: 'blue.500'
}
},
indicator: {
color: 'black'
}
}
}
},
defaultVariants: {
variant: 'filled'
}
})