import styled from '@emotion/styled';
import Alert from 'sentry/components/alert';
import Button from 'sentry/components/button';
import ExternalLink from 'sentry/components/links/externalLink';
import space from 'sentry/styles/space';
export default {
title: 'Components/Alerts/Alert',
component: Alert,
parameters: {
controls: {hideNoControlsWarning: true},
},
};
export const Default = () => (
Info message with a url
Success message without a url
Warning message
Background workers haven't checked in recently. This can mean an issue with your
configuration or a serious backlog in tasks.
);
Default.parameters = {
docs: {
description: {
story: 'Inline alert messages',
},
},
};
export const WithIcons = () => (
Info message with a url
Success message without a url
Warning message
Background workers haven't checked in recently. This can mean an issue with your
configuration or a serious backlog in tasks.
);
WithIcons.storyName = 'With Leading Icons';
WithIcons.parameters = {
docs: {
description: {
story: 'Optional leading icon via the `showIcon` prop',
},
},
};
export const WithTrailingItems = () => (
Trailing Button}>
Info message with a url
Trailing Button}>
Success message without a url
Trailing Button}>
Warning message
Trailing Button}>
Background workers haven't checked in recently. This can mean an issue with your
configuration or a serious backlog in tasks.
);
WithTrailingItems.storyName = 'With Trailing Items';
WithTrailingItems.parameters = {
docs: {
description: {
story: 'Optional trailing items via the `trailingItems` prop',
},
},
};
export const System = () => (
Info message with a url
Success message without a url
Warning message
Background workers haven't checked in recently. This can mean an issue with your
configuration or a serious backlog in tasks.
);
System.parameters = {
docs: {
description: {
story:
'System-level alert messages that appear at the top of the viewport, or embedded in a panel',
},
},
};
export const Expandable = () => {
return (
Here is some details]}>
Expandable Alert
);
};
Expandable.storyName = 'Expandable';
Expandable.parameters = {
docs: {
description: {
story: 'Expand with details',
},
},
};
const Grid = styled('div')`
display: grid;
gap: ${space(1)};
`;