Skip to content

Commit

Permalink
feat: [Composer] show toolbar toggle button when typing
Browse files Browse the repository at this point in the history
  • Loading branch information
akai committed Jan 3, 2021
1 parent 76add41 commit 11b850b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/components/Composer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,17 +313,8 @@ export const Composer = React.forwardRef<ComposerHandle, ComposerProps>((props,
{renderInput(1)}
{!isInputText && <Recorder {...recorder} />}
</div>
{text && (
<Action
className="Composer-sendBtn"
icon="paper-plane"
color="primary"
onMouseDown={handleSendBtnClick}
aria-label="发送"
/>
)}
{!text && rightAction && <Action {...rightAction} />}
{!text && hasToolbar && (
{hasToolbar && (
<Action
className={clsx('Composer-toggleBtn', {
active: isAccessoryOpen,
Expand All @@ -333,6 +324,15 @@ export const Composer = React.forwardRef<ComposerHandle, ComposerProps>((props,
aria-label={isAccessoryOpen ? '关闭工具栏' : '展开工具栏'}
/>
)}
{text && (
<Action
className="Composer-sendBtn"
icon="paper-plane"
color="primary"
onMouseDown={handleSendBtnClick}
aria-label="发送"
/>
)}
</div>
{isAccessoryOpen && renderExtra()}
</>
Expand Down

0 comments on commit 11b850b

Please sign in to comment.