-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #345 from woylie/more-styles
more styles
- Loading branch information
Showing
19 changed files
with
318 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
// todo | ||
@use "../functions" as f; | ||
|
||
table { | ||
th, | ||
td { | ||
padding: f.spacer(1); | ||
text-align: left; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
gap: f.spacer(1); | ||
align-items: baseline; | ||
|
||
> svg { | ||
svg { | ||
width: 0.75em; | ||
width: 1cap; | ||
height: 0.75em; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,5 @@ | |
@use "button"; | ||
@use "icon"; | ||
@use "property-list"; | ||
@use "skeleton"; | ||
@use "tab-navigation"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@use "../functions" as f; | ||
|
||
.skeleton { | ||
cursor: progress; | ||
background: f.color(background, surface, "1"); | ||
border-radius: f.radius(m); | ||
|
||
&.is-text-line { | ||
width: 100%; | ||
height: f.lines(1); | ||
} | ||
|
||
&.is-text-block { | ||
width: 100%; | ||
height: calc(4 * #{f.lines(1)}); | ||
} | ||
|
||
&.is-image { | ||
width: 100%; | ||
height: 200px; | ||
} | ||
|
||
&.is-circle { | ||
width: 64px; | ||
height: 64px; | ||
border-radius: f.radius(circle); | ||
} | ||
|
||
&.is-rectangle { | ||
width: 200px; | ||
height: 100px; | ||
} | ||
|
||
&.is-square { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@use "../functions" as f; | ||
|
||
.tab-navigation { | ||
width: 100%; | ||
overflow-x: auto; | ||
|
||
> ul { | ||
display: flex; | ||
gap: f.spacer(1); | ||
align-items: center; | ||
padding-left: f.spacer(2); | ||
margin-left: 0; | ||
list-style-type: none; | ||
border-bottom: f.border-width(s) solid f.color(border, neutral, "1"); | ||
|
||
> li { | ||
> a { | ||
display: block; | ||
padding: f.spacer(2) f.spacer(4); | ||
color: f.color(text, secondary); | ||
text-decoration: none; | ||
border-top-left-radius: f.radius(m); | ||
border-top-right-radius: f.radius(m); | ||
|
||
&[aria-current] { | ||
font-weight: f.weight(medium); | ||
background: f.color(background, secondary); | ||
border: f.border-width(s) solid f.color(border, neutral, "1"); | ||
border-bottom-width: 0; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
defmodule Storybook.MyPage do | ||
# See https://hexdocs.pm/phoenix_storybook/PhoenixStorybook.Story.html for full story | ||
# documentation. | ||
use PhoenixStorybook.Story, :page | ||
|
||
@version Mix.Project.config()[:version] | ||
|
||
# def doc, do: "Welcome to Doggo" | ||
|
||
def render(assigns) do | ||
assigns = assign(assigns, :version, @version) | ||
|
||
~H""" | ||
<div class="psb-welcome-page"> | ||
<p> | ||
Doggo is a headless component library for Phoenix LiveView. | ||
<em>Headless UI</em> | ||
refers to components that provide the logic and structure needed to build user interfaces but leave the styling up to you. | ||
</p> | ||
<p> | ||
This storybook presents the components with their default options. Some components already include example styles, while others remain unstyled and will receive example styles in the future. | ||
</p> | ||
<p> | ||
You can override the default options, including component names, base classes, and modifier attributes such as button sizes or variants. | ||
</p> | ||
<p> | ||
The library includes a mix task to generate storybook stories for the components configured in your application. | ||
</p> | ||
<p> | ||
Not all components are feature-complete regarding interactivity or accessibility aspects. For details about component maturity and configuration options, please refer to the <a | ||
href="https://hexdocs.pm/doggo/Doggo.Components.html" | ||
target="_blank" | ||
>Components documentation</a>. | ||
</p> | ||
<p>This storybook was compiled with Doggo <%= @version %>.</p> | ||
<h2>Resources</h2> | ||
<ul> | ||
<li> | ||
<a href="https://github.com/woylie/doggo" target="_blank"> | ||
Github repository | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://hexdocs.pm/doggo/readme.html" target="_blank"> | ||
Installation and usage | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://hexdocs.pm/doggo/Doggo.Components.html" target="_blank"> | ||
Components documentation | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="https://hexdocs.pm/doggo/Mix.Tasks.Dog.Gen.Stories.html" | ||
target="_blank" | ||
> | ||
Story generator task | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
""" | ||
end | ||
end |
Oops, something went wrong.