aws-northstar
Version:
NorthStar Design System
48 lines (44 loc) • 2.27 kB
TypeScript
/** *******************************************************************************************************************
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. *
******************************************************************************************************************** */
import { ReactNode, FunctionComponent } from 'react';
export declare type AlertType = 'error' | 'info' | 'success' | 'warning';
export interface AlertProps {
/** Indicates the type of the message to be displayed. Available options 'error' | 'info' | 'success' | 'warning' */
type?: AlertType;
/** Determines whether the alert is displayed to the user or not. */
visible?: boolean;
/** If true, the component will include a close button in the UI. */
dismissible?: boolean;
/** Aria-label for the dismiss button */
dismissAriaLabel?: string;
/** Heading text */
header?: string;
/** Alert content*/
children?: ReactNode;
/** Displays an action button next to the message area when set. */
buttonText?: string;
/** Determines whether the border has radius.*/
borderRadius?: boolean;
/**
* Fired when the user clicks on the close icon that is displayed
* and dismissible property is set to true.
*/
onDismiss?: () => void;
/** Fired when the user clicks on the action button. */
onButtonClick?: () => void;
}
/**
An alert helps the user know when they need to pay attention to a relatively small piece of information or when they need to take a special action.
**/
declare const Alert: FunctionComponent<AlertProps>;
export default Alert;