Skip to content

Commit

Permalink
enhancements on doc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
devajmeireles committed Jul 11, 2024
1 parent 84afbdc commit 445458b
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 76 deletions.
1 change: 1 addition & 0 deletions app/Enums/Examples/Form/Checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Checkbox

public const LABEL = <<<'HTML'
<x-checkbox label="Receive Alert" />
<x-checkbox label="Receive Alert" position="left" />
HTML;

Expand Down
3 changes: 1 addition & 2 deletions app/Enums/Examples/Form/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ class Color
HTML;

public const LABEL_HINT = <<<'HTML'
<x-color label="Color"
hint="Select your favorite color or insert a hexadecimal value." />
<x-color label="Color" hint="Select your favorite color or insert a hexadecimal value." />
HTML;

public const PICKER = <<<'HTML'
Expand Down
3 changes: 1 addition & 2 deletions app/Enums/Examples/Form/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class Date
public const MIN_MAX_DATES = <<<'HTML'
<!-- You can use dates as strings or Carbon instances -->
<x-date :min-date="now()->subWeek()"
:max-date="now()->addWeek()" />
<x-date :min-date="now()->subWeek()" :max-date="now()->addWeek()" />
HTML;

public const MIN_MAX_YEARS = <<<'HTML'
Expand Down
3 changes: 1 addition & 2 deletions app/Enums/Examples/Form/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ class Number
HTML;

public const LABEL_HINT = <<<'HTML'
<x-number label="Quantity"
hint="Press the plus button to increase one by one" />
<x-number label="Quantity" hint="Press the plus button to increase one by one" />
HTML;

public const MIN_MAX = <<<'HTML'
Expand Down
8 changes: 2 additions & 6 deletions app/Enums/Examples/Form/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ class Password
HTML;

public const LABEL_HINT = <<<'HTML'
<x-password label="Password"
hint="Insert your best password"
value="TallStackUi" />
<x-password label="Password" hint="Insert your best password" value="TallStackUi" />
HTML;

public const ASTERISK = <<<'HTML'
<x-password label="Password *"
hint="Insert your password"
value="TallStackUi" />
<x-password label="Password *" hint="Insert your password" value="TallStackUi" />
HTML;

public const CAPS_LOCK = <<<'HTML'
Expand Down
4 changes: 1 addition & 3 deletions app/Enums/Examples/Form/Pin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class Pin
HTML;

public const LABEL_HINT = <<<'HTML'
<x-pin length="5"
label="Insert the code"
hint="We sent a 5-digit code to your email." />
<x-pin length="5" label="Insert the code" hint="We sent a 5-digit code to your email." />
HTML;

public const PREFIX = <<<'HTML'
Expand Down
4 changes: 1 addition & 3 deletions app/Enums/Examples/Form/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ class Select
HTML;

public const NATIVE_LABEL_HINT = <<<'HTML'
<x-select.native label="Select One Option"
hint="You can choose 1, 2 or 3"
:options="[1,2,3]" />
<x-select.native label="Select One Option" hint="You can choose 1, 2 or 3" :options="[1,2,3]" />
HTML;

public const NATIVE_ADVANCED = <<<'HTML'
Expand Down
7 changes: 2 additions & 5 deletions app/Enums/Examples/Form/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ class Tag
HTML;

public const LABEL_HINT = <<<'HTML'
<x-tag label="Frameworks"
hint="Select your preferred frameworks" />
<x-tag label="Frameworks" hint="Select your preferred frameworks" />
HTML;

public const LIMIT = <<<'HTML'
<x-tag label="Frameworks"
hint="Select your preferred frameworks"
:limit="2" />
<x-tag label="Frameworks" hint="Select your preferred frameworks" :limit="2" />
HTML;

public const PREFIX = <<<'HTML'
Expand Down
4 changes: 1 addition & 3 deletions app/Enums/Examples/Form/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class Upload
HTML;

public const LABEL_HINT_TIP = <<<'HTML'
<x-upload label="Screenshot"
hint="We need to analyze your screenshot"
tip="Drag and drop your screenshot here" />
<x-upload label="Screenshot" hint="We need to analyze your screenshot" tip="Drag and drop your screenshot here" />
HTML;

public const DELETE = <<<'HTML'
Expand Down
4 changes: 1 addition & 3 deletions app/Enums/Examples/Ui/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ class Boolean
HTML;

public const ICONS = <<<'HTML'
<x-boolean :boolean="$trueOrFalse"
icon-when-true="hand-thumb-up"
icon-when-false="hand-thumb-down" />
<x-boolean :boolean="$trueOrFalse" icon-when-true="hand-thumb-up" icon-when-false="hand-thumb-down" />
HTML;

public const COLORS = <<<'HTML'
Expand Down
4 changes: 1 addition & 3 deletions app/Enums/Examples/Ui/Clipboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class Clipboard
HTML;

public const LABEL_HINT = <<<'HTML'
<x-clipboard label="Library"
hint="Click to copy the library name"
text="TallStackUI" />
<x-clipboard label="Library" hint="Click to copy the library name" text="TallStackUI" />
HTML;

public const SECRET = <<<'HTML'
Expand Down
59 changes: 15 additions & 44 deletions app/Enums/Examples/Ui/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,55 +23,34 @@ class Link
HTML;

public const SIZES = <<<'HTML'
<x-link href="https://google.com.br/"
text="TallStackUI"
sm />
<x-link href="https://google.com.br/" text="TallStackUI" sm />
<!-- default size -->
<x-link href="https://google.com.br/"
text="TallStackUI"
md />
<x-link href="https://google.com.br/" text="TallStackUI" md />
<x-link href="https://google.com.br/"
text="TallStackUI"
lg />
<x-link href="https://google.com.br/" text="TallStackUI" lg />
HTML;

public const ICONS = <<<'HTML'
<x-link href="https://google.com.br/"
text="TallStackUI"
icon="link" />
<x-link href="https://google.com.br/"
text="TallStackUI"
icon="arrow-up-right"
position="right" />
<x-link href="https://google.com.br/" text="TallStackUI" icon="link" />
<x-link href="https://google.com.br/" text="TallStackUI" icon="arrow-up-right" position="right" />
HTML;

public const BLANK_BOLD_UNDERLINE = <<<'HTML'
<x-link href="https://google.com.br/"
text="TallStackUI"
blank />
<x-link href="https://google.com.br/" text="TallStackUI" blank />
<x-link href="https://google.com.br/"
text="TallStackUI"
bold />
<x-link href="https://google.com.br/" text="TallStackUI" bold />
<x-link href="https://google.com.br/"
text="TallStackUI"
underline />
<x-link href="https://google.com.br/" text="TallStackUI" underline />
HTML;

public const QUERY_FRAGMENT = <<<'HTML'
<!-- The "query" accepts an array or an instance of Collection. -->
<x-link href="https://google.com.br/"
text="TallStackUI"
:query="['status' => 'active']" />
<x-link href="https://google.com.br/" text="TallStackUI" :query="['status' => 'active']" />
<x-link href="https://google.com.br/"
text="TallStackUI"
fragment="query-string-fragment-options" />
<x-link href="https://google.com.br/" text="TallStackUI" fragment="query-string-fragment-options" />
HTML;

public const COLORS = <<<'HTML'
Expand Down Expand Up @@ -104,27 +83,19 @@ class Link
HTML;

public const WITHOUT_COLOR = <<<'HTML'
<x-link href="https://google.com.br/"
text="TallStackUI"
colorless />
<x-link href="https://google.com.br/" text="TallStackUI" colorless />
<!-- or -->
<x-link href="https://google.com.br/"
text="TallStackUI"
:color="null" />
<x-link href="https://google.com.br/" text="TallStackUI" :color="null" />
HTML;

public const NAVIGATE = <<<'HTML'
<!-- For `wire:navigate` -->
<x-link :href="route('route-name-goes-here')"
text="Navigate"
navigate />
<x-link :href="route('route-name-goes-here')" text="Navigate" navigate />
<!-- For `wire:navigate.hover` -->
<x-link :href="route('route-name-goes-here')"
text="Navigate Hover"
navigate-hover />
<x-link :href="route('route-name-goes-here')" text="Navigate Hover" navigate-hover />
HTML;

public const PERSONALIZATION = <<<'HTML'
Expand Down

0 comments on commit 445458b

Please sign in to comment.