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

set intent types to string #1341

Merged
merged 2 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type PositionTypes =
| 'bottom-right'
| 'left'
| 'right'
export type IntentTypes = 'none' | 'info' | 'success' | 'warning' | 'danger'
Copy link
Contributor

Choose a reason for hiding this comment

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

RIP

export type IntentTypes = string
export type DefaultAppearance = 'default'
export type AlertAppearance = DefaultAppearance | 'card'
export type ButtonAppearance = DefaultAppearance | 'minimal' | 'primary'
Expand Down
2 changes: 1 addition & 1 deletion src/alert/src/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Alert.propTypes = {
/**
* The intent of the alert.
*/
intent: PropTypes.oneOf(['none', 'success', 'warning', 'danger']),
intent: PropTypes.string,

/**
* The title of the alert.
Expand Down
2 changes: 1 addition & 1 deletion src/alert/src/InlineAlert.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ InlineAlert.propTypes = {
/**
* The intent of the alert. This should always be set explicitly.
*/
intent: PropTypes.oneOf(['none', 'success', 'warning', 'danger']),
intent: PropTypes.string,

/**
* When true, show a icon on the left matching the type.
Expand Down
2 changes: 1 addition & 1 deletion src/buttons/src/IconButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ IconButton.propTypes = {
/**
* The intent of the button.
*/
intent: PropTypes.oneOf(['none', 'success', 'warning', 'danger']),
intent: PropTypes.string,

/**
* The appearance of the button.
Expand Down
2 changes: 1 addition & 1 deletion src/corner-dialog/src/CornerDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ CornerDialog.propTypes = {
/**
* The intent of the CornerDialog. Used for the button.
*/
intent: PropTypes.oneOf(['none', 'success', 'warning', 'danger']),
intent: PropTypes.string,

/**
* When true, the dialog is shown.
Expand Down
2 changes: 1 addition & 1 deletion src/dialog/src/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Dialog.propTypes = {
/**
* The intent of the Dialog. Used for the button.
*/
intent: PropTypes.oneOf(['none', 'success', 'warning', 'danger']),
intent: PropTypes.string,

/**
* When true, the dialog is shown.
Expand Down
2 changes: 1 addition & 1 deletion src/menu/src/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ MenuItem.propTypes = {
/**
* The intent of the menu item.
*/
intent: PropTypes.oneOf(['none', 'success', 'warning', 'danger']),
intent: PropTypes.string,

/**
* Flag to indicate whether the menu item is disabled or not
Expand Down
2 changes: 1 addition & 1 deletion src/table/src/TableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ TableRow.propTypes = {
/**
* The intent of the alert.
*/
intent: PropTypes.oneOf(['none', 'success', 'warning', 'danger']),
intent: PropTypes.string,

/**
* The appearance of the table row. Default theme only support default.
Expand Down
2 changes: 1 addition & 1 deletion src/toaster/src/Toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Toast.propTypes = {
/**
* The type of the alert.
*/
intent: PropTypes.oneOf(['none', 'success', 'warning', 'danger']),
intent: PropTypes.string,

/**
* The title of the alert.
Expand Down