Skip to content

Commit 529e614

Browse files
Change styling
1 parent 5bd64a3 commit 529e614

26 files changed

+374
-19
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div {{ $attributes }} class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg p-6 dark:text-white text-zinc-500 dark:text-zinc-300 hover:text-zinc-800 dark:hover:text-white">
2+
{{ $slot }}
3+
</div>

resources/views/components/form.blade.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<form {{ $attributes }}>
22
<div class="space-y-6">
33
@if (isset($errors) && $errors->any())
4-
<x-appkit::alert>{{ config('formulate.form_error_message') }}</x-appkit::alert>
4+
<x-appkit::alert type="error" title="Error">
5+
{{ config('formulate.form_error_message') }}
6+
{{ dump($errors) }}
7+
</x-appkit::alert>
58
@endif
69

710
{{ $slot }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<div class="bg-gray-100 dark:bg-gray-900">
2+
<div class="grid grid-cols-[15%_minmax(0,1fr)_15%] grid-rows-[auto_1fr_auto] [grid-template-areas:'header_header_header''sidebar_main_aside''sidebar_footer_aside'] min-h-screen">
3+
<div class="[grid-area:header] sticky top-0 z-100">
4+
{{ $header ?? '' }}
5+
</div>
6+
7+
<div class="[grid-area:main]">
8+
<div class="p-8">{{ $slot ?? '' }}</div>
9+
</div>
10+
11+
<div class="[grid-area:footer] p-6 text-white bg-white dark:bg-gray-800 shadow-sm border-t border-gray-100 dark:border-gray-700">
12+
{{ $footer ?? '' }}
13+
</div>
14+
15+
<div class="[grid-area:sidebar] overflow-y-auto overscroll-contain flex flex-col gap-4 p-4 bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700" x-data x-bind:style="{ position: 'sticky', top: $el.offsetTop + 'px', 'max-height': 'calc(100dvh - ' + $el.offsetTop + 'px)' }">
16+
{{ $sidebar ?? '' }}
17+
</div>
18+
19+
<div class="[grid-area:aside] flex flex-col gap-4 p-4 bg-white dark:bg-gray-800 border-l text-white border-gray-200 dark:border-gray-700" x-data x-bind:style="{ position: 'sticky', top: $el.offsetTop + 'px', 'max-height': 'calc(100dvh - ' + $el.offsetTop + 'px)' }">
20+
<div class="p-4">{{ $aside ?? 'Empty Aside' }}</div>
21+
</div>
22+
</div>
23+
</div>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div {{ $attributes }}>
2+
<div {{ $titleElement }}>{{ $title }}</div>
3+
4+
{{ $slot }}
5+
</div>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<nav {{ $attributes }}>
2+
{{ $slot }}
3+
</nav>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<a href="{{ $href }}" {{ $attributes }}>
2+
<div class="flex-1 leading-none whitespace-nowrap">
3+
{{ $slot }}
4+
</div>
5+
6+
<span class="text-xs font-medium rounded-sm px-1 py-0.5 text-zinc-700 dark:text-zinc-200 bg-teal-400/15 dark:bg-teal-500/10">12</span>
7+
</a>

src/Components/App.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22

33
namespace AppKit\UI\Components;
44

5+
use AppKit\UI\Attributes\ExposedAsState;
6+
57
class App extends BaseComponent
68
{
79
/**
810
* Create an instance of the component
911
*/
10-
public function __construct()
12+
public function __construct(
13+
#[ExposedAsState]
14+
public string $accent = 'teal',
15+
)
1116
{
1217
// constructor promotion handles the rest
1318
}

src/Components/BaseComponent.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ public function render()
289289
// if we have inheritable attributes on the component (attributes passed in from another attribute bag)
290290
if (isset($data['inheritedAttributes'])) {
291291
// we merge them in right at the end
292-
dd($this->inheritedAttributes);
293292
$data['attributes'] = $data['attributes']->merge($this->inheritedAttributes);
294293
}
295294

src/Components/Button.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Button extends BaseComponent
1616
*/
1717
public function __construct(
1818
#[ExposedAsState]
19-
public string $color = 'red',
19+
public string $color = 'accent',
2020
#[ExposedAsState]
2121
public string $size = 'md',
2222
#[ExposedAsState]

src/Components/Card.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace AppKit\UI\Components;
4+
5+
class Card extends BaseComponent
6+
{
7+
/**
8+
* Create an instance of the component
9+
*/
10+
public function __construct()
11+
{
12+
// constructor promotion handles the rest
13+
}
14+
}

0 commit comments

Comments
 (0)