-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(web-twig): Introduce UNSTABLE_Divider component #DS-1302
Please use it with caution.
- Loading branch information
Showing
5 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
packages/web-twig/src/Resources/components/UNSTABLE_Divider/README.md
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,9 @@ | ||
# UNSTABLE Divider | ||
|
||
⚠️ This component is UNSTABLE and there could be breaking changes in the future. Please use it with caution. | ||
|
||
Basic example usage: | ||
|
||
```twig | ||
<UNSTABLE_Divider /> | ||
``` |
9 changes: 9 additions & 0 deletions
9
packages/web-twig/src/Resources/components/UNSTABLE_Divider/UNSTABLE_Divider.stories.twig
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,9 @@ | ||
{% extends 'layout/plain.html.twig' %} | ||
|
||
{% block content %} | ||
|
||
<DocsSection title="Default" stackAlignment="stretch"> | ||
{% include '@components/UNSTABLE_Divider/stories/DividerDefault.twig' %} | ||
</DocsSection> | ||
|
||
{% endblock %} |
15 changes: 15 additions & 0 deletions
15
packages/web-twig/src/Resources/components/UNSTABLE_Divider/UNSTABLE_Divider.twig
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,15 @@ | ||
{# API #} | ||
{%- set props = props | default([]) -%} | ||
|
||
{# Class names #} | ||
{%- set _rootClassName = _spiritClassPrefix ~ 'UNSTABLE_Divider' -%} | ||
|
||
{# Miscellaneous #} | ||
{%- set _styleProps = useStyleProps(props) -%} | ||
{%- set _classNames = [ _rootClassName, _styleProps.className ] -%} | ||
|
||
<hr | ||
{{ mainProps(props) }} | ||
{{ styleProp(_styleProps) }} | ||
{{ classProp(_classNames) }} | ||
> |
1 change: 1 addition & 0 deletions
1
packages/web-twig/src/Resources/components/UNSTABLE_Divider/stories/DividerDefault.twig
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 @@ | ||
<UNSTABLE_Divider /> |
1 change: 1 addition & 0 deletions
1
packages/web-twig/src/Resources/twig-components/unstable_divider.twig
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 @@ | ||
{% extends '@spirit/UNSTABLE_Divider/UNSTABLE_Divider.twig' %} |