0 votes
in ReactJS by

How to combine multiple inline style objects?

1 Answer

0 votes
by

You can use spread operator in regular React:

 <button style={{...styles.panel.button, ...styles.panel.submitButton}}>{'Submit'}</button>

If you're using React Native then you can use the array notation:

<button style={[styles.panel.button, styles.panel.submitButton]}>{'Submit'}</button>

Related questions

0 votes
asked Mar 22, 2022 in TypeScript - JavaScript's Superset by sharadyadav1986
0 votes
asked Jun 22, 2022 in Django by SakshiSharma
...