Skip to content

Commit

Permalink
Feat(web-twig): Introduce UNSAFE_Divider component #DS-1302
Browse files Browse the repository at this point in the history
Please use it with caution.
  • Loading branch information
crishpeen committed May 28, 2024
1 parent f9978e9 commit 011e3e2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# UNSAFE Divider

⚠️ This component is UNSAFE and there could be breaking changes in the future. Please use it with caution.

Basic example usage:

```twig
<UNSAFE_Divider />
```
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/UNSAFE_Divider/stories/DividerDefault.twig' %}
</DocsSection>

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{# API #}
{%- set props = props | default([]) -%}

{# Class names #}
{%- set _rootClassName = _spiritClassPrefix ~ 'UNSAFE_Divider' -%}

{# Miscellaneous #}
{%- set _styleProps = useStyleProps(props) -%}
{%- set _classNames = [ _rootClassName, _styleProps.className ] -%}

<hr
{{ mainProps(props) }}
{{ styleProp(_styleProps) }}
{{ classProp(_classNames) }}
>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<UNSAFE_Divider />
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends '@spirit/UNSAFE_Divider/UNSAFE_Divider.twig' %}

0 comments on commit 011e3e2

Please sign in to comment.