-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Attempted to wrap an existing component:
<Scroll
type="class"
element="response-scroll-target"
>
<Box
column
className="response-scroll-target"
>
{this.props.type === 'success' ? (
<React.Fragment>
<Text variant={this.props.type}>
{this.props.x.header}
</Text>
<Text variant="body">{this.props.x.message}</Text>
<ConfirmationButton secondary>Next</ConfirmationButton>
</React.Fragment>
) : (
<React.Fragment>
<Text variant={this.props.type}>
{this.props.y.header}
</Text>
<Text variant="body">{this.props.y.message}</Text>
</React.Fragment>
)}
</Box>
</Scroll>Doesn't work with offset, either:
<Scroll offset={3000}>
<Box
column
className="response-scroll-target"
>
{this.props.type === 'success' ? (
<React.Fragment>
<Text variant={this.props.type}>
{this.props.x.header}
</Text>
<Text variant="body">{this.props.x.message}</Text>
<ConfirmationButton secondary>Next</ConfirmationButton>
</React.Fragment>
) : (
<React.Fragment>
<Text variant={this.props.type}>
{this.props.y.header}
</Text>
<Text variant="body">{this.props.y.message}</Text>
</React.Fragment>
)}
</Box>
</Scroll>but doesn't seem to do anything. It's a little unclear how this is expected to work as a component—using snippets from the documented examples don't work either. I'll take a crack at putting up a PR with updated documentation if I can get 'er working.
update: Looks like the component requires a click to fire off scrollTo.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels