Skip to content

Commit b77313d

Browse files
author
Andrey Okonetchnikov
committed
Loose types to make mixins work with both Theme UI and styled-system
1 parent 90017d2 commit b77313d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/mixins/src/mixins.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export const focusBoxShadow =
3131
*/
3232
export const focusRingStyles =
3333
(color: string, disabled: boolean = false) =>
34-
(theme: Theme) => {
35-
const themeColor = transparentize(color, 0)(getTheme(theme)) // This serves as a getter from theme
34+
(props: object) => {
35+
const themeColor = transparentize(color, 0)(getTheme(props)) // This serves as a getter from theme
3636
if (disabled) {
3737
return {
3838
outline: "none"
@@ -42,7 +42,7 @@ export const focusRingStyles =
4242
outline: "none",
4343
borderColor: themeColor,
4444
transition: "box-shadow .25s",
45-
...focusBoxShadow(themeColor)(theme)
45+
...focusBoxShadow(themeColor)(props)
4646
}
4747
}
4848

@@ -57,8 +57,8 @@ export const focusRingStyles =
5757
*/
5858
export const focusRing =
5959
(color: string, disabled = false, hover = false) =>
60-
(theme: Theme) => {
61-
const styles = focusRingStyles(color, disabled)(getTheme(theme))
60+
(props: object) => {
61+
const styles = focusRingStyles(color, disabled)(getTheme(props))
6262
const baseStyles = {
6363
".js-focus-visible &:focus:not(.focus-visible)": {
6464
outline: 0

0 commit comments

Comments
 (0)