From 0d8993f3b51efcd8b53025c39d0dada4ad4ec8e4 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula <42547589+terabytesoftw@users.noreply.github.com> Date: Fri, 24 Dec 2021 09:32:21 -0300 Subject: [PATCH] Update docs (#54) --- docs/breadcrumbs.md | 10 +++- docs/dropdown.md | 80 ++++++++++++++++++--------- docs/navbar.md | 99 +++++++++++++++++++++++---------- src/Breadcrumbs.php | 18 +++--- src/Dropdown.php | 132 ++++++++++++++++++++++++++++---------------- src/Nav.php | 64 ++++++++++----------- src/NavBar.php | 62 ++++++++++----------- tests/NavTest.php | 1 - 8 files changed, 284 insertions(+), 182 deletions(-) diff --git a/docs/breadcrumbs.md b/docs/breadcrumbs.md index 742875b..20c117f 100644 --- a/docs/breadcrumbs.md +++ b/docs/breadcrumbs.md @@ -57,10 +57,14 @@ The code above generates the following HTML: ``` +## Setters + +All setters are immutable and return a new instance of the `Yiisoft\Yii\Bulma\Breadcrumbs` class with the specified value. + Method | Description | Default -------|-------------|--------- -`activeItemTemplate(string $value)`| Template used to render each active item in the breadcrumbs. | `
  • {icon}{label}
  • \n` -`aria-label` | Defines a string value that labels the current element. | `breadcrumbs` +`activeItemTemplate(string $value)`| Template used to render each active item in the breadcrumbs. | `
  • {link}
  • \n` +`ariaLabel` | Defines a string value that labels the current element. | `breadcrumbs` `attributes(array $value)` | HTML attributes for the widget container nav tag. | `[]` `autoIdPrefix(string $value)` | Prefix to the automatically generated widget ID. | `w` `encode()` | Enable/Disable encoding for labels. | `false` @@ -70,7 +74,7 @@ Method | Description | Default `itemsAttributes(array $value)` | HTML attributes for the items widget. | `[]` `itemTemplate(string $value)` | Template used to render each inactive item in the breadcrumbs. | `
  • {icon}{link}
  • \n` -Items structure is an array of the following structure: +### Items structure is an array of the following structure: ```php [ diff --git a/docs/dropdown.md b/docs/dropdown.md index e7b6b6c..6b08521 100644 --- a/docs/dropdown.md +++ b/docs/dropdown.md @@ -48,41 +48,71 @@ $this->setJsFiles($assetManager->getJsFiles()); ?> ``` -HTML produced is like the following: +The code above generates the following HTML: ```html -