21 lines
484 B
JavaScript
21 lines
484 B
JavaScript
export default (clickable, deletable, collection, alias, policyForm) => (
|
|
scope = '#policies',
|
|
createSelector = '[for="new-policy-toggle"]'
|
|
) => {
|
|
return {
|
|
scope: scope,
|
|
create: clickable(createSelector),
|
|
form: policyForm(),
|
|
policies: alias('selectedOptions'),
|
|
selectedOptions: collection(
|
|
'[data-test-policies] [data-test-tabular-row]',
|
|
deletable(
|
|
{
|
|
expand: clickable('label'),
|
|
},
|
|
'+ tr'
|
|
)
|
|
),
|
|
};
|
|
};
|