react-insta-stories icon indicating copy to clipboard operation
react-insta-stories copied to clipboard

Fullscreen mode?

Open jwoertink opened this issue 5 years ago • 2 comments

Is there a way to make the stories go in to a full screen mode?

jwoertink avatar Jan 31 '20 20:01 jwoertink

These are hard coded in the global.ts at present, not had chance to dig too deep but it should be possible to create a more dynamic option.

.

JamesBotterill avatar Nov 18 '20 09:11 JamesBotterill

I did this by doing the following:

constructor(props) {
  super(props);
  this.state = { width: 0, height: 0 };
  this.updateWindowDimensions = this.updateWindowDimensions.bind(this);
} 

componentDidMount() {
  this.updateWindowDimensions();
  window.addEventListener('resize', this.updateWindowDimensions);
}

componentWillUnmount() {
  window.removeEventListener('resize', this.updateWindowDimensions);
}

updateWindowDimensions() {

	let width = window.innerWidth

	if(width <= 432) {

		this.setState({ width: window.innerWidth, height: window.innerHeight });

	}
	else {
		this.setState({ width: 432, height: 768 });
	}
  
}

JamesBotterill avatar Dec 09 '20 09:12 JamesBotterill