Skip to content

Conversation

@giuseppe-hex
Copy link
Contributor

This module adds an ACF partial which can be added to any ACF block. It displays a select list populated by all files in the resources/images/icons directory:

image image
<x-icon-hex />
<x-icon-hex class="c-icon--right" />
<x-icon-hex class="c-icon--down" />
<x-icon-hex class="c-icon--left"/>

or

@svg('hex')
@svg('hex', 'c-icon--right)
@svg('hex', 'c-icon--down)
@svg('hex', 'c-icon--left)
image

@Jamiewarb
Copy link
Member

nice

Comment on lines +1 to +17
.c-icon {
&--up {
tranform: rotate(0);
}

&--right {
transform: rotate(45deg);
}

&--down {
transform: rotate(180deg);
}

&--left {
transform: rotate(270deg);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need these classes or can we just use tailwind?

e.g. u-rotate-45

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can, I'm just being verbose/OCD about naming 😅 I'll remove.

protected function getIcons(): array
{
$filesystem = new Filesystem();
$files = $filesystem->allFiles(get_template_directory() . '/resources/images/icons');
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to use a Bloom config, and set this in there?

I can foresee an easier time updating repositories in future as Bloom evolves if we have per-app configuration for this, rather than putting it in separate files.

We have a config directory already, is it possible to use that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Jamiewarb Are you referring to the file path specifically? If so, yeah that makes sense 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants