Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divider improve demo and tests #1468

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@
⚠️ This component is UNSTABLE. It may significantly change at any point in the future.
Please use it with caution.

Basic example usage:
The `UNSTABLE_Divider` component is used to separate content in a layout.

```twig
<UNSTABLE_Divider />
```

## API

The components accept [additional attributes][readme-additional-attributes].
If you need more control over the styling of a component, you can use [style props][readme-style-props]
and [escape hatches][readme-escape-hatches].

[readme-additional-attributes]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/README.md#additional-attributes
[readme-escape-hatches]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/README.md#escape-hatches
[readme-style-props]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/README.md#style-props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

namespace Lmc\SpiritWebTwigBundle\Resources\components\UNSTABLE_Divider;

use Lmc\SpiritWebTwigBundle\AbstractComponentSnapshotTest;

class DividerSnapshotTest extends AbstractComponentSnapshotTest
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<UNSTABLE_Divider />

<!-- Render with all props -->
<UNSTABLE_Divider
UNSAFE_className="custom-class"
UNSAFE_style="outline: 5px solid blue; outline-offset: -5px;"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
</title>
</head>
<body>
<hr class="UNSTABLE_Divider">
<!-- Render with all props -->

<hr style="outline: 5px solid blue; outline-offset: -5px;" class="UNSTABLE_Divider custom-class">
</body>
</html>
literat marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
6 changes: 6 additions & 0 deletions packages/web/src/scss/components/UNSTABLE_Divider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@

⚠️ This component is UNSTABLE. It may significantly change at any point in the future.
Please use it with caution.

The `UNSTABLE_Divider` component is used to separate content in a layout.

```html
<hr class="UNSTABLE_Divider" />
```
Loading