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

[Docs] Custom action fix typos #182

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions docs/grid/custom_action.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Creating custom Action
Creating custom Actions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question about file header as in previous #180 (comment)

======================

There are certain cases when built-in action types are not enough.

All you need to do is create your own action template and register it
for the `sylius_grid`.

In the template we will specify the button's icon to be `mail` and its
colour to be `purple`.
In this example, we will specify the action button's icon to be `mail` and its
colour to be `purple` inside the template.

```twig
{% import '@SyliusUi/Macro/buttons.html.twig' as buttons %}
Expand All @@ -17,7 +17,7 @@ colour to be `purple`.
{{ buttons.default(path, action.label, null, 'mail', 'purple') }}
```

Now configure the new action's template like below in the
Now configure the new action's template like below in
`config/packages/sylius_grid.yaml`:

```yaml
Expand All @@ -28,7 +28,7 @@ sylius_grid:
contactSupplier: "@App/Grid/Action/contactSupplier.html.twig"
```

From now on you can use your new action type in the grid configuration!
From now on, you can use your new action type in the grid configuration!

Let's assume that you already have a route for contacting your
suppliers, then you can configure the grid action:
Expand Down