The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

1

I would suggest to use a state variable to set the value of autoPlay for your carousel. Assuming, you have a property with isAutoPlay: boolean in your state: You can set the autoPlay to true on web-part initialization as: this.setState({ isAutoPlay: true }); In your onClick function, set this property to false like: this.setState({ isAutoPlay: false }); ...


1

I solved this issue using below code: toggle(b) { if (this.state.description === b) { this.setState({ description: null }) } else { this.setState({ description: b }) } } myColor(b) { if (this.state.description === b) { return "#ff9933"; } return ""; } Reference: Change color of selected element - React.


1

You can wrap the Pivot component inside a div element and add your custom style to it like: <div className={styles.pivotWrapper}> <Pivot linkFormat={PivotLinkFormat.tabs} linkSize={PivotLinkSize.large} > <PivotItem headerText="Current" itemIcon="Recent"> <Label></Label> </PivotItem> <...


Top 50 recent answers are included