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

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
main
Haelwenn (lanodan) Monnier 6 years ago committed by ThibG
parent 93d98f62a8
commit c2fa36bbae

@ -230,17 +230,17 @@ class ComposerOptions extends ImmutablePureComponent {
const contentTypeItems = {
plain: {
icon: 'file',
icon: 'align-left',
name: 'text/plain',
text: <FormattedMessage {...messages.plain} />,
},
html: {
icon: 'file-text',
icon: 'code',
name: 'text/html',
text: <FormattedMessage {...messages.html} />,
},
markdown: {
icon: 'file-text',
icon: 'arrow-circle-down',
name: 'text/markdown',
text: <FormattedMessage {...messages.markdown} />,
},
@ -311,7 +311,8 @@ class ComposerOptions extends ImmutablePureComponent {
value={privacy}
/>
<Dropdown
icon="code"
disabled={disabled}
icon={(contentTypeItems[contentType.split('/')[1]] || {}).icon}
items={[
contentTypeItems.plain,
contentTypeItems.html,

Loading…
Cancel
Save