Improving TextAreaControl to support code and modal (#2988)

This commit is contained in:
Maxime Beauchemin
2017-06-19 22:27:16 -07:00
committed by GitHub
parent b9915e7ecf
commit 7e5e229f48
4 changed files with 81 additions and 13 deletions

View File

@@ -828,8 +828,10 @@ export const controls = {
markup_type: {
type: 'SelectControl',
label: 'Markup Type',
clearable: false,
choices: formatSelectOptions(['markdown', 'html']),
default: 'markdown',
validators: [v.nonEmpty],
description: 'Pick your favorite markup language',
},
@@ -867,6 +869,9 @@ export const controls = {
type: 'TextAreaControl',
label: 'Code',
description: 'Put your code here',
mapStateToProps: state => ({
language: state.controls ? state.controls.markup_type.value : null,
}),
default: '',
},