♻️ (buttonSendWrapper): refactor button to use Button component for consistency
✨ (buttonSendWrapper): add variant and size props to Button component for customization
This commit is contained in:
parent
05fd2ff67b
commit
5d34461ab5
1 changed files with 6 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import IconComponent from "../../../../../../../components/genericIconComponent";
|
import IconComponent from "../../../../../../../components/genericIconComponent";
|
||||||
|
import { Button } from "../../../../../../../components/ui/button";
|
||||||
import { Case } from "../../../../../../../shared/components/caseComponent";
|
import { Case } from "../../../../../../../shared/components/caseComponent";
|
||||||
import { FilePreviewType } from "../../../../../../../types/components";
|
import { FilePreviewType } from "../../../../../../../types/components";
|
||||||
import { classNames } from "../../../../../../../utils/utils";
|
import { classNames } from "../../../../../../../utils/utils";
|
||||||
|
|
@ -21,7 +22,7 @@ const ButtonSendWrapper = ({
|
||||||
files,
|
files,
|
||||||
}: ButtonSendWrapperProps) => {
|
}: ButtonSendWrapperProps) => {
|
||||||
return (
|
return (
|
||||||
<button
|
<Button
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"form-modal-send-button",
|
"form-modal-send-button",
|
||||||
noInput
|
noInput
|
||||||
|
|
@ -32,6 +33,8 @@ const ButtonSendWrapper = ({
|
||||||
)}
|
)}
|
||||||
disabled={lockChat || saveLoading}
|
disabled={lockChat || saveLoading}
|
||||||
onClick={(): void => send()}
|
onClick={(): void => send()}
|
||||||
|
variant="none"
|
||||||
|
size="none"
|
||||||
>
|
>
|
||||||
<Case
|
<Case
|
||||||
condition={
|
condition={
|
||||||
|
|
@ -45,7 +48,7 @@ const ButtonSendWrapper = ({
|
||||||
/>
|
/>
|
||||||
</Case>
|
</Case>
|
||||||
|
|
||||||
<Case condition={noInput}>
|
<Case condition={noInput && !lockChat}>
|
||||||
<IconComponent
|
<IconComponent
|
||||||
name="Zap"
|
name="Zap"
|
||||||
className="form-modal-play-icon"
|
className="form-modal-play-icon"
|
||||||
|
|
@ -65,7 +68,7 @@ const ButtonSendWrapper = ({
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
</Case>
|
</Case>
|
||||||
</button>
|
</Button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue