processton-io/processton-elements

This package will generate common elements

1.0.1 2024-05-17 17:23 UTC

This package is auto-updated.

Last update: 2024-11-17 18:48:47 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

Installation

You can install the package via composer:

composer require processton-io/processton-elements

Usage

Generate Content Basic Example

ProcesstonElements::generateContent([
    ProcesstonElements::generateHeader('Your Title Here', 3),
    ProcesstonElements::generateText('your text here'),
    ProcesstonElements::generateList([
        "List Item 1",
        "List Item 2"
    ]),
    ProcesstonElements::generateImage('path_to_image', 'image_caption')
], ProcesstonElements::width(12, 12, 12))

Advance

Generate Content

ProcesstonElements::generateContent(
    $arrayOfContentItems,
    $objectOfProcesstonElementWidth
)

Generate Content Data (API)

ProcesstonElements::generateContentData([
    $arrayOfContentItems
])

Generate Width (ProcesstonElementWidth)

ProcesstonElements::width(
    $SM_Widh,
    $MD_Widh,
    $LG_Width,
    $AditioalSizes = [
        'xxxs' => $XXXS_Width,
        'xxs' => $XXS_Width,
        'xs' => $XS_Width,
        'xl' => $XL_Width,
        'xxl' => $XXL_Width,
        'xxxl' => $XXXL_Width
    ]
)

Generate Title Element (h1,h2,h3,h4,h5,h6)

ProcesstonElements::generateHeader($you_title, $level)

Generate Text Element (Paragraph)

ProcesstonElements::generateText($you_text)

Generate List

ProcesstonElements::generateList([
    "List Item 1",
    "List Item 2"
])

Generate Image

ProcesstonElements::generateImage($URL_ToImage, $ImageCaption)

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email ahmadkokab@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.