diff --git a/core/src/components/alert/alert-interface.ts b/core/src/components/alert/alert-interface.ts index 4b109ea99f1..cee68260208 100644 --- a/core/src/components/alert/alert-interface.ts +++ b/core/src/components/alert/alert-interface.ts @@ -20,7 +20,7 @@ export interface AlertOptions { } export interface AlertInput { - type?: TextFieldTypes | 'checkbox' | 'radio'; + type?: TextFieldTypes | 'checkbox' | 'radio' | 'textarea'; name?: string; placeholder?: string; value?: any; diff --git a/core/src/components/alert/alert.scss b/core/src/components/alert/alert.scss index e62adb38906..99f254e35d2 100644 --- a/core/src/components/alert/alert.scss +++ b/core/src/components/alert/alert.scss @@ -197,3 +197,8 @@ .alert-checkbox-inner { box-sizing: border-box; } + +textarea.alert-input { + min-height: $alert-input-min-height; + resize: none; +} diff --git a/core/src/components/alert/alert.tsx b/core/src/components/alert/alert.tsx index da9058d323c..e2e9f4b1a3c 100644 --- a/core/src/components/alert/alert.tsx +++ b/core/src/components/alert/alert.tsx @@ -373,25 +373,46 @@ export class Alert implements ComponentInterface, OverlayInterface { } return (
- { inputs.map(i => ( -
- i.value = (e.target as any).value} - id={i.id} - disabled={i.disabled} - tabIndex={0} - class={{ - 'alert-input': true, - 'alert-input-disabled': i.disabled || false - }} - /> -
- ))} + { inputs.map(i => { + if (i.type === 'textarea') { + return ( +
+