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.

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

Successfully merging this pull request may close these issues.

3 participants