Skip to content

Commit

Permalink
Merge pull request #33 from Joaoviana/allow-label-style-props
Browse files Browse the repository at this point in the history
fix: pass labelStyleProps down to FormLabel
  • Loading branch information
koolamusic authored Mar 29, 2021
2 parents 8a4d9d4 + af6a2e6 commit a8a1e8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`ChakraUI AutoComplete it renders 1`] = `
className="chakra-stack css-1pifhv5"
>
<label
className="chakra-form__label css-uvho5g"
className="chakra-form__label css-1l2u59i"
htmlFor="downshift-0-input"
id="downshift-0-label"
>
Expand Down
3 changes: 3 additions & 0 deletions src/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export default function MultiSelect() {
tagStyleProps={{
rounded: 'full'
}}
labelStyleProps={{
color: 'rebeccapurple'
}}
label='Choose preferred work locations'
placeholder='Type a Country'
onCreateItem={handleCreateItem}
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export const CUIAutoComplete = <T extends Item>(

return (
<Stack>
<FormLabel {...getLabelProps({})}>{label}</FormLabel>
<FormLabel {...{...labelStyleProps, ...getLabelProps({})}}>{label}</FormLabel>

{/* ---------Stack with Selected Menu Tags above the Input Box--------- */}
{selectedItems && (
Expand Down

0 comments on commit a8a1e8f

Please sign in to comment.