@Shahid_Siddiqui_04 You can refer to the below approach:
1. JavaScript should extend the existing functionality of the asset selection toolbar. Example:
(function(document, $) {
'use strict';
$(document).on('foundation-contentloaded', function(e) {
var toolbar = $(".granite-collection-actionbar");
if (toolbar.length > 0) {
var customButton = $('<button is="coral-button" variant="primary" icon="add" title="Custom Action">Custom Action</button>');
customButton.on('click', function() {
// Add your custom action logic here
alert('Custom action triggered');
});
toolbar.append(customButton);
}
});
})(document, Granite.$);
2. Update your component to include the newly created client library
<clientlibs js="custom-asset-toolbar" />