Excuse me. A. B {} after this style is import in react, how can className be added?

styles.css:

.a .b{
  width: 100px
}

index,js

imppot React from "react"
import styles from "./styles"
function demo(){
  return (
    <div className={styles["a", "b"]}>
      
    </div>
  )
}

it doesn"t seem to have any effect if I write like this above!

Mar.20,2021

className='a b'


<div className='a'>
    <div className='b'>
      
    </div>
</div>

1.webpack packing style

import React from 'react'
function demo(){
  return (
    <div className='a' style={{width: 100}}>
        <div className='b' style={{width: 100}}>
        </div>
    </div>
  )
}
Menu