Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a bit of help #11

Open
dagatsoin opened this issue Jan 21, 2017 · 2 comments
Open

Need a bit of help #11

dagatsoin opened this issue Jan 21, 2017 · 2 comments

Comments

@dagatsoin
Copy link

dagatsoin commented Jan 21, 2017

I just discovered this component but I can't get how to make it work.

I use React Storybook to work on my component. Is there any issue with it ? As it renders the component into a iframe?

Here is my component:

import React from 'react';
import injectSheet from 'react-jss';

import style from '../theme/splitView';

import Section from '../4-layouts/Section';
import View from '../0-atoms/View';
import Sticky from 'react-sticky-state';

const SplitView = ({sheet:{classes}, renderTop, renderMiddle, renderBottom}) =>
  <View className={classes.wzSplitView}>
    <Section className="topView">{renderTop()}</Section>
    <Sticky>
      <div className="sticky top" style={{top: "132px"}}>
        <View className="handleBar">{renderMiddle()}</View>
      </div>
    </Sticky>
    <Section className="bottomView" secondary>{renderBottom()}</Section>
  </View>;

export default injectSheet(style)(SplitView);

And two screen shots:
capture d ecran 2017-01-21 a 17 07 56
capture d ecran 2017-01-21 a 17 08 19

I excepting my middle tab bar to stays stick at the top but nothing happens. Event the class is not changing.

@joristruyen
Copy link

joristruyen commented Feb 27, 2017

Same problem here.
I can see the sticky class is applied, but nothing happens when scrolling, nothing sticks, no classes are added.
Only thing I did was: Wrapping a div in a “Sticky" tag, added the default classes to css.
Do I forget something?

@huvber
Copy link

huvber commented Sep 1, 2017

you should set the css to have top or bottom property like the reference behaviour
https://developer.mozilla.org/en/docs/Web/CSS/position#Sticky_positioning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants