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

fix(table): Adjust TableCaption margins based on caption position #4880

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

valentinpolitov
Copy link

Description

This pull request updates the TableCaption component to conditionally apply margins depending on whether the caption is positioned at the top or bottom of the table. Previously, the component always applied a top margin (mt-4), which was not suitable when the caption was placed at the top of the table.

Before and After

Before:

The caption always has a top margin (mt-4), even when positioned at the top, leading to extra space above the caption.

before

After:

The caption's margin adjusts based on its position:

  • Top Position: Applies mb-4 (bottom margin).
  • Bottom Position: Applies mt-4 (top margin).

after

Copy link

vercel bot commented Sep 17, 2024

@valentinpolitov is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant