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

created new props to fix timeline width #2490

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ammarNoon
Copy link

Currently, the timeline events and hour rows are taking the width of a screen, which makes the event box overflow
added a prop where you can pass your container width to contain everything within

Before:
Screenshot 2024-07-02 at 12 51 48 PM

After:
Screenshot 2024-07-02 at 12 56 15 PM

@@ -247,7 +252,7 @@ const Timeline = (props: TimelineProps) => {
// @ts-expect-error
ref={scrollView}
style={styles.current.container}
contentContainerStyle={[styles.current.contentStyle, {width: constants.screenWidth}]}
contentContainerStyle={[styles.current.contentStyle, {width: (availableWidth ?? constants.screenWidth)}]}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer not to have a prop just for the content container width but instead, allow overriding/merge to the 'contentContainerStyle'. Maybe by exposing 'scrollViewProps' prop where you can pass any ScrollView props and override some (!) of its props.

Copy link

stale bot commented Jan 22, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants