Unverified Commit 4fd06791 authored by Haelwenn's avatar Haelwenn

Content-Type Dropdown: use the selected option icon for the menu

parent 1740c5ef
...@@ -238,17 +238,17 @@ class ComposerOptions extends ImmutablePureComponent { ...@@ -238,17 +238,17 @@ class ComposerOptions extends ImmutablePureComponent {
const contentTypeItems = { const contentTypeItems = {
plain: { plain: {
icon: 'file', icon: 'align-left',
name: 'text/plain', name: 'text/plain',
text: <FormattedMessage {...messages.plain} />, text: <FormattedMessage {...messages.plain} />,
}, },
html: { html: {
icon: 'file-text', icon: 'code',
name: 'text/html', name: 'text/html',
text: <FormattedMessage {...messages.html} />, text: <FormattedMessage {...messages.html} />,
}, },
markdown: { markdown: {
icon: 'file-text', icon: 'arrow-circle-down',
name: 'text/markdown', name: 'text/markdown',
text: <FormattedMessage {...messages.markdown} />, text: <FormattedMessage {...messages.markdown} />,
}, },
...@@ -352,7 +352,8 @@ class ComposerOptions extends ImmutablePureComponent { ...@@ -352,7 +352,8 @@ class ComposerOptions extends ImmutablePureComponent {
value={privacy} value={privacy}
/> />
<Dropdown <Dropdown
icon="code" disabled={disabled}
icon={(contentTypeItems[contentType.split('/')[1]] || {}).icon}
items={[ items={[
contentTypeItems.plain, contentTypeItems.plain,
contentTypeItems.html, contentTypeItems.html,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment