mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-11 11:05:28 +00:00
chore: migrate Button to @revoltchat/ui (#617)
* chore: start moving Button over * fix: convert ServerIdentityModal * fix: modal button styling * fix: popover styles * fix: clean up references to ui/*.* * fix: button sizing Co-authored-by: Ed L <beartechtalks@gmail.com>
This commit is contained in:
@@ -43,13 +43,12 @@ export function CreateBotModal({ onClose, onCreate }: Props) {
|
||||
actions={[
|
||||
{
|
||||
confirmation: true,
|
||||
contrast: true,
|
||||
accent: true,
|
||||
palette: "accent",
|
||||
onClick: handleSubmit(onSubmit),
|
||||
children: <Text id="app.special.modals.actions.create" />,
|
||||
},
|
||||
{
|
||||
plain: true,
|
||||
palette: "plain",
|
||||
onClick: onClose,
|
||||
children: <Text id="app.special.modals.actions.cancel" />,
|
||||
},
|
||||
|
||||
@@ -88,7 +88,7 @@ export function ModifyAccountModal({ onClose, field }: Props) {
|
||||
{
|
||||
onClick: onClose,
|
||||
children: <Text id="app.special.modals.actions.cancel" />,
|
||||
plain: true,
|
||||
palette: "plain",
|
||||
},
|
||||
]}>
|
||||
{/* Preact / React typing incompatabilities */}
|
||||
|
||||
@@ -5,9 +5,10 @@ import styles from "./ServerIdentityModal.module.scss";
|
||||
import { Text } from "preact-i18n";
|
||||
import { useEffect, useState } from "preact/hooks";
|
||||
|
||||
import { Button } from "@revoltchat/ui";
|
||||
|
||||
import { noop } from "../../../lib/js";
|
||||
|
||||
import Button from "../../../components/ui/Button";
|
||||
import InputBox from "../../../components/ui/InputBox";
|
||||
import Modal from "../../../components/ui/Modal";
|
||||
import Overline from "../../../components/ui/Overline";
|
||||
@@ -95,7 +96,7 @@ export const ServerIdentityModal = observer(({ server, onClose }: Props) => {
|
||||
</Button>
|
||||
{currentNickname !== "" && (
|
||||
<Button
|
||||
plain
|
||||
palette="plain"
|
||||
onClick={() =>
|
||||
member.edit({ remove: ["Nickname"] })
|
||||
}>
|
||||
|
||||
@@ -15,6 +15,8 @@ import styles from "./UserProfile.module.scss";
|
||||
import { Localizer, Text } from "preact-i18n";
|
||||
import { useContext, useEffect, useLayoutEffect, useState } from "preact/hooks";
|
||||
|
||||
import { Button } from "@revoltchat/ui";
|
||||
|
||||
import { noop } from "../../../lib/js";
|
||||
|
||||
import ChannelIcon from "../../../components/common/ChannelIcon";
|
||||
@@ -24,7 +26,6 @@ import UserBadges from "../../../components/common/user/UserBadges";
|
||||
import UserIcon from "../../../components/common/user/UserIcon";
|
||||
import { Username } from "../../../components/common/user/UserShort";
|
||||
import UserStatus from "../../../components/common/user/UserStatus";
|
||||
import Button from "../../../components/ui/Button";
|
||||
import IconButton from "../../../components/ui/IconButton";
|
||||
import Modal from "../../../components/ui/Modal";
|
||||
import Overline from "../../../components/ui/Overline";
|
||||
@@ -195,7 +196,10 @@ export const UserProfile = observer(
|
||||
</div>
|
||||
{isPublicBot && (
|
||||
<Link to={`/bot/${user._id}`}>
|
||||
<Button accent compact onClick={onClose}>
|
||||
<Button
|
||||
palette="accent"
|
||||
compact
|
||||
onClick={onClose}>
|
||||
Add to server
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user