* better selection highlighting * now auto scrolling a bug in chrome seems to prevent us from enable smooth scrollingpull/2/head
parent
f53f60667f
commit
280a4f5a50
3 changed files with 22 additions and 6 deletions
@ -1,15 +1,15 @@ |
||||
import React from "react"; |
||||
import React, {forwardRef} from "react"; |
||||
|
||||
import SlideItem from "./SlideItem"; |
||||
|
||||
const Slide = ({data, className, ...props}) => { |
||||
const Slide = forwardRef(({data, className, ...props}, ref) => { |
||||
return ( |
||||
<article className={`slide${data?.title ? " title" : ""} ${className}`} {...props}> |
||||
<article className={`slide${data?.title ? " title" : ""} ${className}`} {...props} ref={ref}> |
||||
{data?.content.map((item, index) => |
||||
<SlideItem item={item} key={index} /> |
||||
)} |
||||
</article> |
||||
); |
||||
}; |
||||
}); |
||||
|
||||
export default Slide; |
Loading…
Reference in new issue