evermade / wp-block-toolkit

Toolkit for developing WordPress Gutenberg blocks.
https://www.evermade.fi
GNU General Public License v3.0
9 stars 1 forks source link

Shouldn't it be className not class in SortableItem? #1

Closed sdevore closed 2 years ago

sdevore commented 2 years ago

https://github.com/evermade/wp-block-toolkit/blob/fa7a7c25d1dd43283a48ce937c47e2fbd782a6c6/src/components/SortablePostsControl.js#L121

const SortableItem = SortableElement(({ value, onRemove }) => (
    <div class="wpbt-sortable-posts-control__sortable-item">
        <span>{value.label}</span>
        <div
            class="wpbt-sortable-posts-control__sortable-remove"
            onClick={() => onRemove(value)}
        />
    </div>
));

Should be

const SortableItem = SortableElement(({ value, onRemove }) => (
    <div class="wpbt-sortable-posts-control__sortable-item">
        <span>{value.label}</span>
        <div
            className="wpbt-sortable-posts-control__sortable-remove"
            onClick={() => onRemove(value)}
        />
    </div>
));

Let me know if you would rather this in a pull request.