Skip to content

Commit 834569f

Browse files
committed
Update prop to variant
1 parent 29a6aaa commit 834569f

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Check out these demos:
3434
- [Extra Props](#extra-props)
3535
- [`size`](#size--options-sm-md-lg--default-md)
3636
- [`colorScheme`](#colorscheme)
37-
- [`appearanceVariant`](#appearanceVariant)
37+
- [`variant`](#variant)
3838
- [`tagVariant`](#tagvariant--options-subtle-solid-outline--default-subtle)
3939
- [`isInvalid`](#isinvalid--default-false)
4040
- [`focusBorderColor` / `errorBorderColor`](#focusbordercolor--default-blue500--errorbordercolor--default-red500)
@@ -142,13 +142,13 @@ return (
142142
);
143143
```
144144

145-
#### `appearanceVariant`
145+
#### `variant`
146146

147147
You can set `outline`, `unstyled`, `flushed` or `filled`, which will reflect the same styles of Chakra-Ui select possible appearances [Check chakra-ui variants styles](https://chakra-ui.com/docs/components/select#changing-the-appearance)!
148148

149149
```js
150150
return (
151-
<Select appearanceVariant="flushed" />
151+
<Select variant="flushed" />
152152
);
153153
```
154154

src/chakra-components/containers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const ValueContainer = <
7272
isMulti,
7373
hasValue,
7474
innerProps,
75-
selectProps: { size, chakraStyles, appearanceVariant: variant },
75+
selectProps: { size, chakraStyles, variant },
7676
} = props;
7777

7878
// Getting the css from input instead of select

src/chakra-components/control.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const Control = <
3737
chakraStyles,
3838
focusBorderColor,
3939
errorBorderColor,
40-
appearanceVariant: variant,
40+
variant,
4141
},
4242
} = props;
4343

src/module-augmentation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import type { CSSObject } from "@chakra-ui/system";
33
import type { GroupBase } from "react-select";
44
import type {
5-
AppearanceVariant,
65
ChakraStylesConfig,
76
SelectedOptionStyle,
87
Size,
98
TagVariant,
9+
Variant,
1010
} from "./types";
1111

1212
/**
@@ -77,14 +77,14 @@ declare module "react-select/dist/declarations/src/Select" {
7777
colorScheme?: string;
7878

7979
/**
80-
* The `appearanceVariant` prop that changes the select main style
80+
* The `variant` prop that changes the select main style
8181
*
8282
* Options: "outline" | "unstyled" | "flushed" | "filled"
8383
*
8484
* @defaultValue `outline`
8585
* @see {@link https://chakra-ui.com/docs/components/select#changing-the-appearance}
8686
*/
87-
appearanceVariant?: AppearanceVariant;
87+
variant?: Variant;
8888

8989
/**
9090
* The `variant` prop that will be forwarded to your `MultiValue` component

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export interface SizeProps<PropType = string | number> {
4040

4141
export type Size = "sm" | "md" | "lg";
4242

43-
export type AppearanceVariant = "outline" | "unstyled" | "flushed" | "filled";
43+
export type Variant = "outline" | "unstyled" | "flushed" | "filled";
4444

4545
export type TagVariant = "subtle" | "solid" | "outline";
4646

0 commit comments

Comments
 (0)