Skip to content

Commit 15daa6f

Browse files
committed
refactor: change repsonsiveCLassNames to repsonsiveClassNames
1 parent 64dad04 commit 15daa6f

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

packages/coreui-react/src/components/grid/CCol.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const BREAKPOINTS = [
6666

6767
export const CCol = forwardRef<HTMLDivElement, CColProps>(
6868
({ children, className, ...rest }, ref) => {
69-
const repsonsiveCLassNames: string[] = []
69+
const repsonsiveClassNames: string[] = []
7070

7171
BREAKPOINTS.forEach((bp) => {
7272
const breakpoint = rest[bp]
@@ -75,34 +75,34 @@ export const CCol = forwardRef<HTMLDivElement, CColProps>(
7575
const infix = bp === 'xs' ? '' : `-${bp}`
7676

7777
if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
78-
repsonsiveCLassNames.push(`col${infix}-${breakpoint}`)
78+
repsonsiveClassNames.push(`col${infix}-${breakpoint}`)
7979
}
8080

8181
if (typeof breakpoint === 'boolean') {
82-
repsonsiveCLassNames.push(`col${infix}`)
82+
repsonsiveClassNames.push(`col${infix}`)
8383
}
8484

8585
if (breakpoint && typeof breakpoint === 'object') {
8686
if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
87-
repsonsiveCLassNames.push(`col${infix}-${breakpoint.span}`)
87+
repsonsiveClassNames.push(`col${infix}-${breakpoint.span}`)
8888
}
8989

9090
if (typeof breakpoint.span === 'boolean') {
91-
repsonsiveCLassNames.push(`col${infix}`)
91+
repsonsiveClassNames.push(`col${infix}`)
9292
}
9393

9494
if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
95-
repsonsiveCLassNames.push(`order${infix}-${breakpoint.order}`)
95+
repsonsiveClassNames.push(`order${infix}-${breakpoint.order}`)
9696
}
9797

9898
if (typeof breakpoint.offset === 'number') {
99-
repsonsiveCLassNames.push(`offset${infix}-${breakpoint.offset}`)
99+
repsonsiveClassNames.push(`offset${infix}-${breakpoint.offset}`)
100100
}
101101
}
102102
})
103103

104104
const _className = classNames(
105-
repsonsiveCLassNames.length ? repsonsiveCLassNames : 'col',
105+
repsonsiveClassNames.length ? repsonsiveClassNames : 'col',
106106
className,
107107
)
108108

packages/coreui-react/src/components/grid/CContainer.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ const BREAKPOINTS = [
4444

4545
export const CContainer = forwardRef<HTMLDivElement, CContainerProps>(
4646
({ children, className, ...rest }, ref) => {
47-
const repsonsiveCLassNames: string[] = []
47+
const repsonsiveClassNames: string[] = []
4848

4949
BREAKPOINTS.forEach((bp) => {
5050
const breakpoint = rest[bp]
5151
delete rest[bp]
5252

53-
breakpoint && repsonsiveCLassNames.push(`container-${bp}`)
53+
breakpoint && repsonsiveClassNames.push(`container-${bp}`)
5454
})
5555

5656
const _className = classNames(
57-
repsonsiveCLassNames.length ? repsonsiveCLassNames : 'container',
57+
repsonsiveClassNames.length ? repsonsiveClassNames : 'container',
5858
className,
5959
)
6060

packages/coreui-react/src/components/grid/CRow.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const BREAKPOINTS = [
6363

6464
export const CRow = forwardRef<HTMLDivElement, CRowProps>(
6565
({ children, className, ...rest }, ref) => {
66-
const repsonsiveCLassNames: string[] = []
66+
const repsonsiveClassNames: string[] = []
6767

6868
BREAKPOINTS.forEach((bp) => {
6969
const breakpoint = rest[bp]
@@ -73,21 +73,21 @@ export const CRow = forwardRef<HTMLDivElement, CRowProps>(
7373

7474
if (typeof breakpoint === 'object') {
7575
if (breakpoint.cols) {
76-
repsonsiveCLassNames.push(`row-cols${infix}-${breakpoint.cols}`)
76+
repsonsiveClassNames.push(`row-cols${infix}-${breakpoint.cols}`)
7777
}
7878
if (typeof breakpoint.gutter === 'number') {
79-
repsonsiveCLassNames.push(`g${infix}-${breakpoint.gutter}`)
79+
repsonsiveClassNames.push(`g${infix}-${breakpoint.gutter}`)
8080
}
8181
if (typeof breakpoint.gutterX === 'number') {
82-
repsonsiveCLassNames.push(`gx${infix}-${breakpoint.gutterX}`)
82+
repsonsiveClassNames.push(`gx${infix}-${breakpoint.gutterX}`)
8383
}
8484
if (typeof breakpoint.gutterY === 'number') {
85-
repsonsiveCLassNames.push(`gy${infix}-${breakpoint.gutterY}`)
85+
repsonsiveClassNames.push(`gy${infix}-${breakpoint.gutterY}`)
8686
}
8787
}
8888
})
8989

90-
const _className = classNames('row', repsonsiveCLassNames, className)
90+
const _className = classNames('row', repsonsiveClassNames, className)
9191

9292
return (
9393
<div className={_className} ref={ref}>

0 commit comments

Comments
 (0)