krzysztofzylka/bootstrap-generator

此包已被弃用且不再维护。作者建议使用krzysztofzylka/bootstrap-generator包代替。

Bootstrap 5.3 生成器

1.0.0 2023-01-07 09:23 UTC

This package is auto-updated.

Last update: 2023-11-30 16:08:41 UTC


README

安装

composer install krzysztofzylka/bootstra-generator

\krzysztofzylka\BootstrapGenerator\BootstrapGenerator

方法

警告

use \krzysztofzylka\BootstrapGenerator\BootstrapGenerator;
use \krzysztofzylka\BootstrapGenerator\enum\ThemeColor;

BootstrapGenerator::alert('alert!', ThemeColor::Primary)
    //not required additional methods
    ->header('header') //alert header
    ->headerTag('h4'); //custom header tag

徽章

use \krzysztofzylka\BootstrapGenerator\BootstrapGenerator;
use \krzysztofzylka\BootstrapGenerator\enum\BackgroundColor;

BootstrapGenerator::badge('badge!', BackgroundColor::Primary)
    //not required additional method
    ->roundedPill(); //rounded

面包屑

use \krzysztofzylka\BootstrapGenerator\BootstrapGenerator;

BootstrapGenerator::breadcrumb()
    ->addBreadcrumb('a', 'true', '#')
    ->...;

按钮

use \krzysztofzylka\BootstrapGenerator\BootstrapGenerator;
use \krzysztofzylka\BootstrapGenerator\enum\ThemeColor;
use \krzysztofzylka\BootstrapGenerator\enum\Size;

BootstrapGenerator::button('button!', ThemeColor::Primary)
    //not required additional method
    ->tag('div')
    ->size(Size::Sm)
    ->disable()
    ->badge('badge', ThemeColor::Secondary)