Skip to content

Commit

Permalink
docs: fix notification documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtute90 authored Sep 16, 2024
1 parent 548608a commit f281b01
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 103 deletions.
97 changes: 1 addition & 96 deletions stories/Components/Notification.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,99 +315,4 @@ export const FixedPositions: Story = {
</div>
);
}
};

export const NotificationOptionsComponent_Fake = () => {
return null;
};

//Componenti non usati ma presenti nella precedente documentazione

/*
export const _NotificationWithMessage_story_hidden: Story = {
render: () => {
return (
<div>
<Button
onClick={() =>
notify(
'Titolo Notifica',
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p>
)
}
>
Genera Notifica standard
</Button>
<Button
onClick={() =>
notify(
'Titolo Notifica',
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…</p>,
{ state: 'success' }
)
}
>
Genera Notifica con icona
</Button>
<NotificationManager />
</div>
);
},
parameters: {
// disables Chromatic's snapshotting on a story level
chromatic: { disableSnapshot: true }
}
};
export const EsempioInterattivo: Story = {
render: ({
title,
message,
duration,
icon,
state,
fix,
dismissable,
closeOnClick
}) => {
return (
<div>
<Button onClick={() => notify(title, message, { duration, icon, state, dismissable })}>Mostra Notifica</Button>
<Button onClick={() => notify.dismiss()}>Chiudi tutte le notifiche</Button>
<NotificationManager fix={fix} closeOnClick={closeOnClick} />
</div>
);
},
parameters : { controls: { expanded: true } }
args : {
title: 'Titolo',
message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor…',
fix: undefined,
dismissable: false,
closeOnClick: false,
duration: 6000,
icon: undefined,
state: undefined
},
argTypes : {
fix: {
control: {
type: 'select',
options: [undefined, 'top', 'bottom', 'right', 'left']
}
},
state: {
control: {
type: 'select',
options: [undefined, 'success', 'error', 'info', 'warning']
}
},
icon: {
control: {
type: 'select',
options: [undefined, 'it-tool', 'it-camera', 'it-check', 'it-calendar']
}
}
};
}; */
};
6 changes: 1 addition & 5 deletions stories/Documentation/Notification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ La funzione `notify` ha la seguente firma:
notify(title, message?, options?);
```

### NotificationOptions

Il dettaglio del tipo `NotificationOptions` è riportato di seguito:

<ArgTypes of={NotificationStories.NotificationOptionsComponent_Fake} />
<ArgTypes of={NotificationManager} />

# Stile notifiche

Expand Down
2 changes: 0 additions & 2 deletions test/__snapshots__/Storybook.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7747,8 +7747,6 @@ exports[`Stories Snapshots Documentazione/Componenti/Notification FixedPositions
</div>
`;

exports[`Stories Snapshots Documentazione/Componenti/Notification NotificationOptionsComponent_Fake 1`] = `<div />`;

exports[`Stories Snapshots Documentazione/Componenti/Notification States 1`] = `
<div>
<div
Expand Down

0 comments on commit f281b01

Please sign in to comment.