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

Covert error prop to indicator #54

Closed
yousifalraheem opened this issue Oct 4, 2019 · 1 comment
Closed

Covert error prop to indicator #54

yousifalraheem opened this issue Oct 4, 2019 · 1 comment
Labels
🔨 Enhancement New feature or request

Comments

@yousifalraheem
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Passing error will show an error indicator highlighted in red with the message being passed. A new success prop of type boolean has been introduced to switch to a success indicator highlighted in green without a message. Currently, there is no way to pass a success indicator with a success message, or even a warning.

Describe the solution you'd like
This whole indication of error/success/warning should be moved to an indicator prop that has this structure:

interface Indicator {
    type: "success" | "warning" | "error";
    message?: string;
}

Describe alternatives you've considered
having seperate props like this:

interface ElementProps {
   // the rest of the props
   error: string;
   warning: string;
   success: string;
}
but using them will be difficult and also it doesn't allow showing the indicator alone without the message if needed
@yousifalraheem yousifalraheem added the 🔨 Enhancement New feature or request label Oct 4, 2019
@yousifalraheem yousifalraheem added this to the v3.0.0 milestone Oct 14, 2019
@yousifalraheem yousifalraheem removed this from the v3.0.0 milestone Jan 28, 2020
@yousifalraheem yousifalraheem added this to the v3.0.0 milestone Apr 2, 2020
@yousifalraheem yousifalraheem removed this from the v5.0.0 milestone Jul 27, 2020
@yousifalraheem
Copy link
Contributor Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant