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

Extract design of login-page to a reusable Card layout #2565

Merged
merged 2 commits into from May 26, 2022

Conversation

ralphjsmit
Copy link
Contributor

This PR extracts the design of the frontend "card-component" to a separate Blade-component, so that packages can use this design as well, without having to copy it over (e.g. in Filament Breezy @jeffgreco13 ).

For example, you can now create components with the following markup:

<x-filament::layouts.card :title="__('user.pages.billing.title')" class="">
    <p class="text-sm text-center text-gray-600">
        {{ __('user.pages.billing.description') }}
    </p>
    
    <x-filament::button tag="a" :href="route('filament.pages.billing')" class="mt-8 w-full">
        {{ __('user.pages.billing.button') }}
    </x-filament::button>
    
    <form method="POST" action="{{ route('filament.auth.logout') }}" class="mt-3 -mb-4">
        @csrf
        <button type="submit" class="w-full text-sm text-gray-400 text-center">{{ __('filament::layout.buttons.logout.label') }}</button>
    </form>
</x-filament::layouts.card>

Schermafbeelding 2022-05-26 om 21 12 26

This didn't have influence on the design of the login page.

@danharrin danharrin added the enhancement New feature or request label May 26, 2022
@danharrin danharrin merged commit cddfc56 into filamentphp:2.x May 26, 2022
@danharrin
Copy link
Member

Thanks

@ralphjsmit ralphjsmit deleted the extract-card-component branch May 26, 2022 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants