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

feat: enable macro on Button builder #224

Merged
merged 2 commits into from
Aug 31, 2024
Merged

feat: enable macro on Button builder #224

merged 2 commits into from
Aug 31, 2024

Conversation

yajra
Copy link
Owner

@yajra yajra commented Aug 31, 2024

Usage

        Button::macro('icon', function (string $icon) {
            /** @var Button $this */
            $this->text("<i class='{$icon}'></i><span>".$this->get('text')."</span>");

            return $this;
        });
            CreateButton::makeIfCan('manage-members')
                ->text('Register Member')
                ->icon('ki-outline ki-plus')
                ->formTitle('Register Member')
                ->editor('registration'),

Copy link

sonarcloud bot commented Aug 31, 2024

@yajra yajra merged commit cf23c65 into master Aug 31, 2024
1 check passed
@yajra yajra deleted the macro branch August 31, 2024 03:57
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.

2 participants