Skip to content

Commit

Permalink
Docs(web-twig): Introduce Link story refs #DS-247
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Apr 4, 2023
1 parent 8b95f99 commit c2273ce
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/web-twig/src/Resources/components/Link/Link.stories.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends 'layout/default.html.twig' %}

{% block content %}

{# Link Default #}
{% include '@components/Link/stories/LinkDefault.twig' %}

{# Link Colors #}
{% include '@components/Link/stories/LinkColors.twig' %}

{% endblock %}
2 changes: 1 addition & 1 deletion packages/web-twig/src/Resources/components/Link/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is Twig implementation of the [Link] component.
Basic example usage:

```twig
<Link href="#" />Link<Link />
<Link href="#">Link</Link>
```

Advanced example usage:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% set colors = [ "primary", "secondary", "inverted" ] %}

<section class="docs-Section">

<h2 class="docs-Heading">Colors</h2>

{% for color in colors %}
<p{% if color is same as('inverted') %} class="docs-Box"{% endif %}>
<Link href="#" color={color}>Link {{ color }}</Link>
</p>
{% endfor %}
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<section class="docs-Section">

<h2 class="docs-Heading">Default</h2>

<p>
<Link href="#">
Link
</Link>
</p>

<p>
<Link
href="#"
color="primary"
isUnderlined
>
Primary Underlined Link
</Link>
</p>

<p>
<Link
href="#"
color="primary"
isDisabled
>
Primary Disabled Link
</Link>
</p>

<p>
<Link href="https://www.example.com/" target="_blank" title="Warning">
⚠️
</Link>
</p>

</section>

0 comments on commit c2273ce

Please sign in to comment.