Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 2db463c

Browse files
committed
refactor(c-alert): use StyleProvider
1 parent 9433c77 commit 2db463c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/c-alert/src/alert.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {
55
DeepComponentThemeConfig,
66
ThemingProps,
77
useMultiStyleConfig,
8-
provideComponentStyles,
9-
useComponentStyles,
8+
useStyles,
9+
StylesProvider,
1010
DOMElements,
1111
} from '@chakra-ui/vue-system'
1212
import { SystemStyleObject } from '@chakra-ui/styled-system'
@@ -91,7 +91,7 @@ export const CAlert = defineComponent({
9191
...styles.value.container,
9292
}
9393

94-
provideComponentStyles('Alert', styles.value)
94+
StylesProvider(styles.value)
9595
AlertProvider({ status: props.status })
9696

9797
return () =>
@@ -115,7 +115,7 @@ export const CAlert = defineComponent({
115115
export const CAlertTitle = defineComponent({
116116
name: 'CAlertTitle',
117117
setup(_, { attrs, slots }) {
118-
const styles = useComponentStyles('Alert')
118+
const styles = useStyles()
119119

120120
return () =>
121121
h(
@@ -137,7 +137,7 @@ export const CAlertTitle = defineComponent({
137137
export const CAlertDescription = defineComponent({
138138
name: 'CAlertDescription',
139139
setup(_, { attrs, slots }) {
140-
const styles = useComponentStyles('Alert')
140+
const styles = useStyles()
141141

142142
return () =>
143143
h(
@@ -166,7 +166,7 @@ export const CAlertIcon = defineComponent({
166166
setup(props, { attrs }) {
167167
const { status } = useAlertContext()
168168
const { icon } = STATUSES[status]
169-
const styles = useComponentStyles('Alert')
169+
const styles = useStyles()
170170

171171
const alertIcon = computed(() => props.icon || icon)
172172

0 commit comments

Comments
 (0)