Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[@mantine/core] Autocomplete: Fix outdated styles api selectors (#2269)
- Loading branch information
Showing
4 changed files
with
14 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,7 @@ | ||
import { createStyles, MantineSize } from '@mantine/styles'; | ||
import { createStyles } from '@mantine/styles'; | ||
|
||
export interface AutocompleteStylesParams { | ||
size: MantineSize; | ||
} | ||
|
||
export default createStyles((theme, { size }: AutocompleteStylesParams) => { | ||
const spacing = theme.fn.size({ size, sizes: theme.spacing }); | ||
|
||
return { | ||
wrapper: { | ||
position: 'relative', | ||
}, | ||
|
||
item: { | ||
textAlign: 'left', | ||
width: '100%', | ||
padding: `${spacing / 1.5}px ${spacing}`, | ||
fontSize: theme.fn.size({ size, sizes: theme.fontSizes }), | ||
color: theme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.black, | ||
}, | ||
|
||
hovered: { | ||
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[4] : theme.colors.gray[1], | ||
}, | ||
|
||
nothingFound: { | ||
boxSizing: 'border-box', | ||
color: theme.colors.gray[6], | ||
paddingTop: spacing / 2, | ||
paddingBottom: spacing / 2, | ||
textAlign: 'center', | ||
}, | ||
}; | ||
}); | ||
export default createStyles(() => ({ | ||
wrapper: { | ||
position: 'relative', | ||
}, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export { Autocomplete } from './Autocomplete'; | ||
export type { AutocompleteItem, AutocompleteProps, AutocompleteStylesNames } from './Autocomplete'; | ||
export type { AutocompleteStylesParams } from './Autocomplete.styles'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters