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

Read more effect #160

Open
menachem1 opened this issue Oct 22, 2023 · 3 comments
Open

Read more effect #160

menachem1 opened this issue Oct 22, 2023 · 3 comments

Comments

@menachem1
Copy link

Is there a way to make a read more affect (possibly by making collapsed height prop a percentage)?

@roginfarrer
Copy link
Owner

After doing a deep-dive into how one might make this, I've found that the easiest solution would be two nest a second instance of a collapse within another. It gets really complicated to handle 3 states for the collapse.

The implementation would look something like this. But instead of deliberately segmenting the content, you'd use the collapsedHeight option to something like 200, or whatever you'd like to collapse it too.

@menachem1
Copy link
Author

Thank you so much.

@menachem1 menachem1 reopened this Oct 24, 2023
@menachem1
Copy link
Author

Is there a way to make that the nested component when expanded should not go on the next line (using span messes up the animation)

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

2 participants