import styled from '@emotion/styled'; import Alert from 'sentry/components/alert'; import ExternalLink from 'sentry/components/links/externalLink'; import {IconCheckmark, IconInfo, IconLightning, IconNot, IconWarning} from 'sentry/icons'; 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 Icons'; WithIcons.parameters = { docs: { description: { story: 'Inline alert messages', }, }, }; 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 ( } expand={[
Here is some details
]} > Expandable Alert
} expand={[
Here is some details
]} expandIcon={} > Expandable Alert with Custom Expand Icon
} expand={[
Here is some details
]} expandIcon={} onExpandIconClick={() => {}} > Expandable Alert with Custom Expand Icon behaviour
); }; Expandable.storyName = 'Expandable'; Expandable.parameters = { docs: { description: { story: 'Expand with details', }, }, }; const Grid = styled('div')` display: grid; gap: ${space(1)}; `;