Skip to content

Conversation

@wayne-w-cloud
Copy link
Contributor

This PR addresses the following issues:

  1. Customizable autoHide and delay.
  2. The variant input has been added to the component input. As a result, the "type" property has been removed from the message object.
  3. Update storybook tests

@wayne-w-cloud wayne-w-cloud requested review from ajswis and pshrest2 May 26, 2023 19:16
@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-mushroom-06a211710-143.centralus.3.azurestaticapps.net

function Alert({style, variant, message, autohide, delay}) {
const [showAlert, setShowAlert] = useState(true);

autohide && typeof autohide === "boolean" ? autohide : false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also set default props for autohide and delay to be false and 5000 respectively.

Copy link
Collaborator

@ajswis ajswis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to split the message.type, message.title, and message.body into their own props instead of passing in an object?

@pshrest2
Copy link
Contributor

Do we want to split the message.type, message.title, and message.body into their own props instead of passing in an object?

It would be cool to have something similar to the react-bootstrap Modal component, but not necessary

<Alert variant="primary" className="custom-className">
   <Alert.Title>Custom Title</Alert.Title>
   <Alert.Body>Custom Body</Alert.Body>
</Alert>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants