Verified Commit bc52654e authored by Haelwenn's avatar Haelwenn
Browse files

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

parent 37e72c35
Pipeline #8380 passed with stage
in 3 minutes and 17 seconds
......@@ -224,17 +224,17 @@ export default class ComposerOptions extends React.PureComponent {
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} />,
},
......@@ -323,7 +323,8 @@ export default class ComposerOptions extends React.PureComponent {
value={privacy}
/>
<Dropdown
icon="code"
disabled={disabled}
icon={(contentTypeItems[contentType.split('/')[1]] || {}).icon}
items={[
contentTypeItems.plain,
contentTypeItems.html,
......
Supports Markdown
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