forked from abner/for-legacy-web
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:
@@ -7,6 +7,8 @@ import styles from "./Invite.module.scss";
|
||||
import { Text } from "preact-i18n";
|
||||
import { useContext, useEffect, useState } from "preact/hooks";
|
||||
|
||||
import { Button } from "@revoltchat/ui";
|
||||
|
||||
import { defer } from "../../lib/defer";
|
||||
import { TextReact } from "../../lib/i18n";
|
||||
|
||||
@@ -22,7 +24,6 @@ import { takeError } from "../../context/revoltjs/util";
|
||||
|
||||
import ServerIcon from "../../components/common/ServerIcon";
|
||||
import UserIcon from "../../components/common/user/UserIcon";
|
||||
import Button from "../../components/ui/Button";
|
||||
import Overline from "../../components/ui/Overline";
|
||||
import Preloader from "../../components/ui/Preloader";
|
||||
|
||||
@@ -71,7 +72,7 @@ export default function Invite() {
|
||||
<Text id="app.special.invite.invalid_desc" />
|
||||
</h2>
|
||||
<div style="cursor: pointer;">
|
||||
<Button contrast>
|
||||
<Button palette="secondary">
|
||||
<ArrowBack
|
||||
size={32}
|
||||
onClick={() =>
|
||||
@@ -152,7 +153,7 @@ export default function Invite() {
|
||||
</h3>
|
||||
<Overline type="error" error={error} />
|
||||
<Button
|
||||
contrast
|
||||
palette="secondary"
|
||||
onClick={async () => {
|
||||
if (status === ClientStatus.READY) {
|
||||
return history.push("/");
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { useParams } from "react-router-dom";
|
||||
import { API, Permission } from "revolt.js";
|
||||
import { API } from "revolt.js";
|
||||
import styled from "styled-components/macro";
|
||||
|
||||
import { useEffect, useState } from "preact/hooks";
|
||||
|
||||
import { Button } from "@revoltchat/ui";
|
||||
|
||||
import { useClient } from "../../context/revoltjs/RevoltClient";
|
||||
|
||||
import UserIcon from "../../components/common/user/UserIcon";
|
||||
import Button from "../../components/ui/Button";
|
||||
import ComboBox from "../../components/ui/ComboBox";
|
||||
import Overline from "../../components/ui/Overline";
|
||||
import Preloader from "../../components/ui/Preloader";
|
||||
@@ -78,7 +79,7 @@ export default function InviteBot() {
|
||||
))}
|
||||
</ComboBox>
|
||||
<Button
|
||||
contrast
|
||||
palette="secondary"
|
||||
onClick={() =>
|
||||
server !== "none" &&
|
||||
client.bots.invite(data._id, { server })
|
||||
@@ -103,7 +104,7 @@ export default function InviteBot() {
|
||||
))}
|
||||
</ComboBox>
|
||||
<Button
|
||||
contrast
|
||||
palette="secondary"
|
||||
onClick={() =>
|
||||
group !== "none" &&
|
||||
client.bots.invite(data._id, { group })
|
||||
|
||||
Reference in New Issue
Block a user