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

Borders #21

Open
Isaac-Flath opened this issue Nov 8, 2024 · 0 comments
Open

Borders #21

Isaac-Flath opened this issue Nov 8, 2024 · 0 comments

Comments

@Isaac-Flath
Copy link
Collaborator

Create a nice abstraction for common borders. For example rounded gray borders, or borders with primary colors, and other things. As an example of where this would be nice but is far too complicated

def UploadZone(icon="upload", text="Drag files here or click to upload"):
    """Creates a styled upload zone with hover effects and better visual hierarchy"""
    return Div(
        cls="border-2 border-dashed border-gray-300 rounded-lg p-6 bg-gray-50 hover:bg-gray-100"
    )(
        DivCentered(
            UkIcon(icon, cls="text-gray-400 w-12 h-12 mb-4"),
            P(text, cls=TextFont.muted_lg),
            P("Maximum file size: 10MB", cls=TextFont.muted_sm),
            Input(type="file", cls="opacity-0 absolute inset-0 w-full h-full cursor-pointer")
        )
    )
Screenshot 2024-11-08 at 3 32 32 PM
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

1 participant