0

I'm new to IonicReact and I don't know how to use css properties to that component. For instance I'm using IonItem component but it not works

<IonItem lines="none" className={classes.ionItem}>
...
</IonItem>

It has default padding and highlight effect so I want to remove it but not sure how to do it. I tried to using useStyles() and CSSProperties but not works.

It has custom css properties like --highlight-height, --inner-padding-start but not sure how to use them with useStyles and CSSProperties.

Jin
  • 924
  • 1
  • 9
  • 34

1 Answers1

0
const ionItem: CSSProperties = {
    width: '100%',
    '--padding-start': '0px',
}

let classes= useStyles();
<IonItem className={classes.ionItem}>...</IonItem>

It should work.

Jin
  • 924
  • 1
  • 9
  • 34