Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert Component #1

Closed
abinashpanda opened this issue Sep 6, 2020 · 0 comments
Closed

Alert Component #1

abinashpanda opened this issue Sep 6, 2020 · 0 comments
Assignees

Comments

@abinashpanda
Copy link
Collaborator

abinashpanda commented Sep 6, 2020

Alert component to show an error, warning, success, or info message.

Alert Props

Prop Description Required Type Default Value
type Type of the alert which can be either AlertType.error or AlertType.warning or AlertType.success or AlertType.info no AlertType AlertType.info
title Alert title yes React.ReactNode
content Alert content no React.ReactNode
icon Alert icon no JSX.Element or boolean
actions Alert action buttons no JSX.Element
closable Making alert closable. It would render (X) button no boolean true
onClose Function to be called on pressing the (X) button no (event: React.MouseEvent<HTMLButtonElement>) => void

Additional Copmonents

AlertButton

Prop Description Required Type Default Value
type Type of button no AlertButtonType AlertButtonType.primary
label Button label yes string
icon Button icon no JSX.Element
loading Button loading no boolean
className additional classes no string
style addtional styles no React.CSSProperties

Stories

  • Info alert
  • Success alert
  • Warning alert
  • Error alert (preferably list of form submit errors)
  • Alert with actions
  • Alert with only title
  • Alert with custom icon
  • Alert with close action
@abinashpanda abinashpanda self-assigned this Sep 6, 2020
@hnagrath09 hnagrath09 self-assigned this Sep 6, 2020
@abinashpanda abinashpanda removed their assignment Sep 6, 2020
hnagrath09 added a commit that referenced this issue Sep 6, 2020
abinashpanda added a commit that referenced this issue Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants