Skip to content

Commit

Permalink
docs: clarify some language around defining what plugin slot changes …
Browse files Browse the repository at this point in the history
…should look like
  • Loading branch information
jsnwesson committed Jan 16, 2024
1 parent 967e674 commit 75423f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/directPlugins/DirectPlugin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ export const DirectPluginOperations = {
};

/**
A placeholder for what allSlotChanges configuration should look like when passed into DirectPluginContext
This is what the allSlotChanges configuration should look like when passed into DirectPluginContext
{
id: "allDirectPluginChanges",
getDirectSlotChanges() {
return {
"main-nav": [
// Hide the "Drafts" link, except for administrators:
{
op: UiChangeOperation.Wrap,
op: DirectPluginChangeOperation.Wrap,
widgetId: "drafts",
wrapper: HideExceptForAdmin,
},
// Add a new login link:
{
op: UiChangeOperation.Insert,
op: DirectPluginChangeOperation.Insert,
widget: { id: "login", priority: 50, content: {
url: "/login", icon: "person-fill", label: <FormattedMessage defaultMessage="Login" />
}},
Expand All @@ -50,7 +50,7 @@ export const DirectPluginOperations = {
*/

/**
A placeholder for what the slotChanges configuration should include depending on the operation:
This is what a slotChanges configuration should include depending on the operation:
slotChanges = [
{ op: DirectPluginOperation.Insert; widget: <DirectSlotWidget object> },
{ op: DirectPluginOperation.Hide; widgetId: string },
Expand Down

0 comments on commit 75423f4

Please sign in to comment.