mirror of
https://github.com/haveno-dex/haveno-ui.git
synced 2024-10-01 07:35:39 -04:00
chore(styles): theme
- updated theme colors - fixed button styles - updated wallet balance molecule - run CI checks on develop branch --- Authored-by: schowdhuri
This commit is contained in:
parent
3b8847bf94
commit
b029419e7f
1
.github/workflows/lint.yml
vendored
1
.github/workflows/lint.yml
vendored
@ -3,6 +3,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- "**.js"
|
- "**.js"
|
||||||
- "**.ts"
|
- "**.ts"
|
||||||
|
1
.github/workflows/tests.yml
vendored
1
.github/workflows/tests.yml
vendored
@ -3,6 +3,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- "packages/**"
|
- "packages/**"
|
||||||
- "tests/**"
|
- "tests/**"
|
||||||
|
1
.github/workflows/typechecking.yml
vendored
1
.github/workflows/typechecking.yml
vendored
@ -3,6 +3,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- "**.ts"
|
- "**.ts"
|
||||||
- "**/tsconfig.json"
|
- "**/tsconfig.json"
|
||||||
|
@ -3,6 +3,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- "yarn.lock"
|
- "yarn.lock"
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
import { Stack } from "@mantine/core";
|
import { Group, Stack } from "@mantine/core";
|
||||||
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||||
import { Button } from ".";
|
import { Button } from ".";
|
||||||
|
|
||||||
@ -30,6 +30,13 @@ const Template: ComponentStory<typeof Button> = () => {
|
|||||||
<Button flavor="neutral">Neutral</Button>
|
<Button flavor="neutral">Neutral</Button>
|
||||||
<Button flavor="success">Success</Button>
|
<Button flavor="success">Success</Button>
|
||||||
<Button flavor="danger">Error</Button>
|
<Button flavor="danger">Error</Button>
|
||||||
|
|
||||||
|
<Group>
|
||||||
|
<Button flavor="primary">Primary</Button>
|
||||||
|
<Button flavor="neutral">Neutral</Button>
|
||||||
|
<Button flavor="success">Success</Button>
|
||||||
|
<Button flavor="danger">Error</Button>
|
||||||
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -22,13 +22,14 @@ type ButtonProps<TComponent> = MButtonProps<TComponent> & {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function Button<TComponent = "button">(props: ButtonProps<TComponent>) {
|
export function Button<TComponent = "button">(props: ButtonProps<TComponent>) {
|
||||||
const { children, flavor = "primary", ...rest } = props;
|
const { children, className, flavor = "primary", ...rest } = props;
|
||||||
const { classes, cx } = useStyles();
|
const { classes, cx } = useStyles();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MButton
|
<MButton
|
||||||
className={cx(
|
className={cx(
|
||||||
classes.common,
|
classes.common,
|
||||||
|
className,
|
||||||
{ [classes.neutral]: flavor === "neutral" },
|
{ [classes.neutral]: flavor === "neutral" },
|
||||||
{ [classes.success]: flavor === "success" },
|
{ [classes.success]: flavor === "success" },
|
||||||
{ [classes.danger]: flavor === "danger" }
|
{ [classes.danger]: flavor === "danger" }
|
||||||
@ -43,9 +44,12 @@ export function Button<TComponent = "button">(props: ButtonProps<TComponent>) {
|
|||||||
const useStyles = createStyles((theme) => ({
|
const useStyles = createStyles((theme) => ({
|
||||||
common: {
|
common: {
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
|
fontSize: "0.875rem",
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
height: 48,
|
height: theme.other.buttonHeight,
|
||||||
padding: "1rem",
|
minWidth: "9.75rem",
|
||||||
|
padding: `0 ${theme.spacing.lg}px`,
|
||||||
|
transition: "color 0.2s, background-color 0.2s",
|
||||||
},
|
},
|
||||||
neutral: {
|
neutral: {
|
||||||
backgroundColor: theme.colors.gray[2],
|
backgroundColor: theme.colors.gray[2],
|
||||||
@ -55,15 +59,15 @@ const useStyles = createStyles((theme) => ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
success: {
|
success: {
|
||||||
backgroundColor: theme.colors.green[7],
|
backgroundColor: theme.colors.green[4],
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme.colors.green[8],
|
backgroundColor: theme.colors.green[5],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
danger: {
|
danger: {
|
||||||
backgroundColor: theme.colors.red[6],
|
backgroundColor: theme.colors.red[4],
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme.colors.red[7],
|
backgroundColor: theme.colors.red[5],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
exports[`atoms::Buttons > renders error button 1`] = `
|
exports[`atoms::Buttons > renders error button 1`] = `
|
||||||
<DocumentFragment>
|
<DocumentFragment>
|
||||||
<button
|
<button
|
||||||
class="mantine-Button-filled mantine-Button-root mantine-r1112v"
|
class="mantine-Button-filled mantine-Button-root mantine-xeynuy"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -22,7 +22,7 @@ exports[`atoms::Buttons > renders error button 1`] = `
|
|||||||
exports[`atoms::Buttons > renders neutral button 1`] = `
|
exports[`atoms::Buttons > renders neutral button 1`] = `
|
||||||
<DocumentFragment>
|
<DocumentFragment>
|
||||||
<button
|
<button
|
||||||
class="mantine-Button-filled mantine-Button-root mantine-birnp8"
|
class="mantine-Button-filled mantine-Button-root mantine-2tbxau"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -41,7 +41,7 @@ exports[`atoms::Buttons > renders neutral button 1`] = `
|
|||||||
exports[`atoms::Buttons > renders primary button by default 1`] = `
|
exports[`atoms::Buttons > renders primary button by default 1`] = `
|
||||||
<DocumentFragment>
|
<DocumentFragment>
|
||||||
<button
|
<button
|
||||||
class="mantine-Button-filled mantine-Button-root mantine-idg0bf"
|
class="mantine-Button-filled mantine-Button-root mantine-1slecx4"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -60,7 +60,7 @@ exports[`atoms::Buttons > renders primary button by default 1`] = `
|
|||||||
exports[`atoms::Buttons > renders success button 1`] = `
|
exports[`atoms::Buttons > renders success button 1`] = `
|
||||||
<DocumentFragment>
|
<DocumentFragment>
|
||||||
<button
|
<button
|
||||||
class="mantine-Button-filled mantine-Button-root mantine-18w1h4r"
|
class="mantine-Button-filled mantine-Button-root mantine-11svsr2"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
@ -50,7 +50,7 @@ const useStyles = createStyles((theme) => ({
|
|||||||
},
|
},
|
||||||
bar: {
|
bar: {
|
||||||
animation: `${bounce} 3s ease-in-out infinite`,
|
animation: `${bounce} 3s ease-in-out infinite`,
|
||||||
background: theme.colors.brand[5],
|
background: theme.colors.blue[5],
|
||||||
borderRadius: 3,
|
borderRadius: 3,
|
||||||
height: 6,
|
height: 6,
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
|
@ -6,7 +6,7 @@ exports[`atoms::ConnectionProgress > renders without exploding 1`] = `
|
|||||||
class="mantine-Stack-root mantine-njf2rt"
|
class="mantine-Stack-root mantine-njf2rt"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-pt30zh"
|
class="mantine-Text-root mantine-102fqds"
|
||||||
>
|
>
|
||||||
Connecting to Monero Network
|
Connecting to Monero Network
|
||||||
</div>
|
</div>
|
||||||
@ -14,7 +14,7 @@ exports[`atoms::ConnectionProgress > renders without exploding 1`] = `
|
|||||||
class="mantine-1p25k2r"
|
class="mantine-1p25k2r"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-5qf5qx"
|
class="mantine-1235arf"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,7 +34,7 @@ export function Sidebar() {
|
|||||||
</Navbar.Section>
|
</Navbar.Section>
|
||||||
))}
|
))}
|
||||||
<Navbar.Section>
|
<Navbar.Section>
|
||||||
<Box p="lg">
|
<Box mt="lg">
|
||||||
<WalletBalance />
|
<WalletBalance />
|
||||||
</Box>
|
</Box>
|
||||||
</Navbar.Section>
|
</Navbar.Section>
|
||||||
@ -45,8 +45,8 @@ export function Sidebar() {
|
|||||||
|
|
||||||
const useStyles = createStyles((theme) => ({
|
const useStyles = createStyles((theme) => ({
|
||||||
logo: {
|
logo: {
|
||||||
height: 32,
|
height: "2rem",
|
||||||
padding: `${theme.spacing.lg} ${theme.spacing.xl}`,
|
padding: `${theme.spacing.lg}px ${theme.spacing.lg}px`,
|
||||||
},
|
},
|
||||||
container: {
|
container: {
|
||||||
width: WIDTH,
|
width: WIDTH,
|
||||||
|
@ -47,7 +47,7 @@ const useStyles = createStyles<string, { isActive: boolean }>(
|
|||||||
(theme, { isActive }, getRef) => ({
|
(theme, { isActive }, getRef) => ({
|
||||||
navLink: {
|
navLink: {
|
||||||
display: "block",
|
display: "block",
|
||||||
padding: "1.5rem 2.5rem",
|
padding: `${theme.spacing.lg}px ${theme.spacing.lg}px`,
|
||||||
transition: "opacity 0.2s",
|
transition: "opacity 0.2s",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ const useStyles = createStyles<string, { isActive: boolean }>(
|
|||||||
svg: isActive
|
svg: isActive
|
||||||
? {
|
? {
|
||||||
path: {
|
path: {
|
||||||
fill: theme.colors.brand[6],
|
fill: theme.colors.blue[6],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
|
@ -12,7 +12,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-khtkeg"
|
class="mantine-khtkeg"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
class="mantine-98j7ht"
|
class="mantine-evhmzv"
|
||||||
fill="none"
|
fill="none"
|
||||||
height="1em"
|
height="1em"
|
||||||
viewBox="0 0 23 34"
|
viewBox="0 0 23 34"
|
||||||
@ -33,7 +33,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-khtkeg"
|
class="mantine-khtkeg"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="mantine-UnstyledButton-root mantine-3p8mxz"
|
class="mantine-UnstyledButton-root mantine-1wgvoyu"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -53,7 +53,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-2juzrl"
|
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-1omu9y9"
|
||||||
>
|
>
|
||||||
Markets
|
Markets
|
||||||
</div>
|
</div>
|
||||||
@ -64,7 +64,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-khtkeg"
|
class="mantine-khtkeg"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="mantine-UnstyledButton-root mantine-3p8mxz"
|
class="mantine-UnstyledButton-root mantine-1wgvoyu"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -88,7 +88,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-2juzrl"
|
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-1omu9y9"
|
||||||
>
|
>
|
||||||
My Offers
|
My Offers
|
||||||
</div>
|
</div>
|
||||||
@ -99,7 +99,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-khtkeg"
|
class="mantine-khtkeg"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="mantine-UnstyledButton-root mantine-3p8mxz"
|
class="mantine-UnstyledButton-root mantine-1wgvoyu"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -127,7 +127,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-2juzrl"
|
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-1omu9y9"
|
||||||
>
|
>
|
||||||
My Trades
|
My Trades
|
||||||
</div>
|
</div>
|
||||||
@ -138,7 +138,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-khtkeg"
|
class="mantine-khtkeg"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="mantine-UnstyledButton-root mantine-3p8mxz"
|
class="mantine-UnstyledButton-root mantine-1wgvoyu"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -158,7 +158,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-2juzrl"
|
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-1omu9y9"
|
||||||
>
|
>
|
||||||
Notifications
|
Notifications
|
||||||
</div>
|
</div>
|
||||||
@ -169,7 +169,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-khtkeg"
|
class="mantine-khtkeg"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="mantine-UnstyledButton-root mantine-3p8mxz"
|
class="mantine-UnstyledButton-root mantine-1wgvoyu"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -188,7 +188,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-2juzrl"
|
class="mantine-Text-root mantine-Group-child __mantine-ref-text mantine-1omu9y9"
|
||||||
>
|
>
|
||||||
Account
|
Account
|
||||||
</div>
|
</div>
|
||||||
@ -199,10 +199,11 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-khtkeg"
|
class="mantine-khtkeg"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-a3o11y"
|
class="mantine-b98ato"
|
||||||
>
|
>
|
||||||
<div
|
<button
|
||||||
class="mantine-11cjvdx"
|
class="mantine-UnstyledButton-root mantine-1v0qbt7"
|
||||||
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Stack-root mantine-lfk3cq"
|
class="mantine-Stack-root mantine-lfk3cq"
|
||||||
@ -211,7 +212,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-Group-root mantine-1lumg83"
|
class="mantine-Group-root mantine-1lumg83"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
class="mantine-gnzaph mantine-Group-child"
|
class="mantine-Group-child mantine-oilh7i"
|
||||||
fill="none"
|
fill="none"
|
||||||
height="1em"
|
height="1em"
|
||||||
viewBox="0 0 20 20"
|
viewBox="0 0 20 20"
|
||||||
@ -243,7 +244,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-Group-child mantine-1ohno7u"
|
class="mantine-Text-root mantine-Group-child mantine-15e7vnj"
|
||||||
>
|
>
|
||||||
Available Balance
|
Available Balance
|
||||||
</div>
|
</div>
|
||||||
@ -251,37 +252,32 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="mantine-Stack-root mantine-1kb6t4k"
|
class="mantine-Stack-root mantine-1kb6t4k"
|
||||||
>
|
>
|
||||||
<button
|
<div
|
||||||
class="mantine-UnstyledButton-root mantine-1o6jmux"
|
class="mantine-Group-root mantine-6y1794"
|
||||||
type="button"
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Group-root mantine-6y1794"
|
class="mantine-Text-root mantine-Group-child mantine-3vx9ct"
|
||||||
>
|
>
|
||||||
<div
|
10.647382650365
|
||||||
class="mantine-Text-root mantine-Group-child mantine-14ayao3"
|
|
||||||
>
|
|
||||||
10.647382650365
|
|
||||||
</div>
|
|
||||||
<svg
|
|
||||||
class="mantine-gnzaph mantine-Group-child"
|
|
||||||
fill="none"
|
|
||||||
height="1em"
|
|
||||||
viewBox="0 0 7 4"
|
|
||||||
width="1em"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
clip-rule="evenodd"
|
|
||||||
d="M2.91916 3.69319C3.23963 4.04927 3.76166 4.04657 4.07971 3.69319L6.82329 0.644746C7.14377 0.288661 7.01636 0 6.53811 0H0.460749C-0.0172283 0 -0.14248 0.291357 0.17557 0.644746L2.91916 3.69319Z"
|
|
||||||
fill="#111111"
|
|
||||||
fill-rule="evenodd"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</button>
|
<svg
|
||||||
|
class="mantine-Group-child mantine-qg5oag"
|
||||||
|
fill="none"
|
||||||
|
height="1em"
|
||||||
|
viewBox="0 0 7 4"
|
||||||
|
width="1em"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="M2.91916 3.69319C3.23963 4.04927 3.76166 4.04657 4.07971 3.69319L6.82329 0.644746C7.14377 0.288661 7.01636 0 6.53811 0H0.460749C-0.0172283 0 -0.14248 0.291357 0.17557 0.644746L2.91916 3.69319Z"
|
||||||
|
fill="#111111"
|
||||||
|
fill-rule="evenodd"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-zvjvuq"
|
class="mantine-Text-root mantine-14xctlx"
|
||||||
>
|
>
|
||||||
(EUR 2441,02)
|
(EUR 2441,02)
|
||||||
</div>
|
</div>
|
||||||
@ -301,12 +297,12 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-Stack-root mantine-1kb6t4k"
|
class="mantine-Stack-root mantine-1kb6t4k"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-ywyx71"
|
class="mantine-Text-root mantine-xtp7ze"
|
||||||
>
|
>
|
||||||
Total
|
Total
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-1lh77dt"
|
class="mantine-Text-root mantine-pxv98s"
|
||||||
>
|
>
|
||||||
14.048212174412
|
14.048212174412
|
||||||
</div>
|
</div>
|
||||||
@ -315,12 +311,12 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-Stack-root mantine-1kb6t4k"
|
class="mantine-Stack-root mantine-1kb6t4k"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-ywyx71"
|
class="mantine-Text-root mantine-xtp7ze"
|
||||||
>
|
>
|
||||||
Reserved
|
Reserved
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-1lh77dt"
|
class="mantine-Text-root mantine-pxv98s"
|
||||||
>
|
>
|
||||||
2.874598526325
|
2.874598526325
|
||||||
</div>
|
</div>
|
||||||
@ -329,12 +325,12 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
class="mantine-Stack-root mantine-1kb6t4k"
|
class="mantine-Stack-root mantine-1kb6t4k"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-ywyx71"
|
class="mantine-Text-root mantine-xtp7ze"
|
||||||
>
|
>
|
||||||
Locked
|
Locked
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-1lh77dt"
|
class="mantine-Text-root mantine-pxv98s"
|
||||||
>
|
>
|
||||||
0.854975624859
|
0.854975624859
|
||||||
</div>
|
</div>
|
||||||
@ -343,7 +339,7 @@ exports[`molecules::Sidebar > renders without exploding 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import {
|
import {
|
||||||
Box,
|
|
||||||
Collapse,
|
Collapse,
|
||||||
createStyles,
|
createStyles,
|
||||||
Group,
|
Group,
|
||||||
@ -31,24 +30,22 @@ export function WalletBalance() {
|
|||||||
const [isOpen, setOpen] = useState(false);
|
const [isOpen, setOpen] = useState(false);
|
||||||
const { classes } = useStyles({ isOpen });
|
const { classes } = useStyles({ isOpen });
|
||||||
return (
|
return (
|
||||||
<Box className={classes.container}>
|
<UnstyledButton
|
||||||
|
className={classes.btnToggle}
|
||||||
|
onClick={() => setOpen(!isOpen)}
|
||||||
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Group spacing="sm">
|
<Group spacing="sm">
|
||||||
<XMRLogo />
|
<XMRLogo className={classes.xmrLogo} />
|
||||||
<Text className={classes.heading} weight={700}>
|
<Text className={classes.heading} weight={700}>
|
||||||
Available Balance
|
Available Balance
|
||||||
</Text>
|
</Text>
|
||||||
</Group>
|
</Group>
|
||||||
<Stack spacing={4}>
|
<Stack spacing={4}>
|
||||||
<UnstyledButton
|
<Group>
|
||||||
className={classes.btnToggle}
|
<Text className={classes.xmr}>10.647382650365</Text>
|
||||||
onClick={() => setOpen(!isOpen)}
|
<ArrowDown className={classes.toggleIcon} />
|
||||||
>
|
</Group>
|
||||||
<Group>
|
|
||||||
<Text className={classes.xmr}>10.647382650365</Text>
|
|
||||||
<ArrowDown />
|
|
||||||
</Group>
|
|
||||||
</UnstyledButton>
|
|
||||||
<Text className={classes.fiat}>(EUR 2441,02)</Text>
|
<Text className={classes.fiat}>(EUR 2441,02)</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Collapse in={isOpen}>
|
<Collapse in={isOpen}>
|
||||||
@ -68,29 +65,34 @@ export function WalletBalance() {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</UnstyledButton>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = createStyles<string, { isOpen: boolean }>(
|
const useStyles = createStyles<string, { isOpen: boolean }>(
|
||||||
(theme, params) => ({
|
(theme, params) => ({
|
||||||
container: {
|
btnToggle: {
|
||||||
border: `solid 1px ${theme.colors.gray[4]}`,
|
border: `solid 1px ${theme.colors.gray[4]}`,
|
||||||
borderRadius: theme.radius.md,
|
borderRadius: theme.radius.md,
|
||||||
padding: theme.spacing.md,
|
padding: theme.spacing.md,
|
||||||
|
|
||||||
|
"&:hover": {
|
||||||
|
borderColor: theme.colors.gray[5],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
xmrLogo: {
|
||||||
|
width: 20,
|
||||||
|
},
|
||||||
|
toggleIcon: {
|
||||||
|
transform: `rotate(${params.isOpen ? 180 : 0}deg)`,
|
||||||
|
transition: "transform 0.2s",
|
||||||
|
width: 8,
|
||||||
},
|
},
|
||||||
heading: {
|
heading: {
|
||||||
fontSize: "0.5rem",
|
fontSize: "0.5rem",
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
},
|
},
|
||||||
btnToggle: {
|
|
||||||
svg: {
|
|
||||||
transform: `rotate(${params.isOpen ? 180 : 0}deg)`,
|
|
||||||
transition: "transform 0.2s",
|
|
||||||
width: 8,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
xmr: {
|
xmr: {
|
||||||
fontSize: "0.75rem",
|
fontSize: "0.75rem",
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
exports[`molecules::WalletBalance > renders without exploding 1`] = `
|
exports[`molecules::WalletBalance > renders without exploding 1`] = `
|
||||||
<DocumentFragment>
|
<DocumentFragment>
|
||||||
<div
|
<button
|
||||||
class="mantine-11cjvdx"
|
class="mantine-UnstyledButton-root mantine-1v0qbt7"
|
||||||
|
type="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Stack-root mantine-lfk3cq"
|
class="mantine-Stack-root mantine-lfk3cq"
|
||||||
@ -12,7 +13,7 @@ exports[`molecules::WalletBalance > renders without exploding 1`] = `
|
|||||||
class="mantine-Group-root mantine-1lumg83"
|
class="mantine-Group-root mantine-1lumg83"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
class="mantine-gnzaph mantine-Group-child"
|
class="mantine-Group-child mantine-oilh7i"
|
||||||
fill="none"
|
fill="none"
|
||||||
height="1em"
|
height="1em"
|
||||||
viewBox="0 0 20 20"
|
viewBox="0 0 20 20"
|
||||||
@ -44,7 +45,7 @@ exports[`molecules::WalletBalance > renders without exploding 1`] = `
|
|||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-Group-child mantine-1ohno7u"
|
class="mantine-Text-root mantine-Group-child mantine-15e7vnj"
|
||||||
>
|
>
|
||||||
Available Balance
|
Available Balance
|
||||||
</div>
|
</div>
|
||||||
@ -52,37 +53,32 @@ exports[`molecules::WalletBalance > renders without exploding 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="mantine-Stack-root mantine-1kb6t4k"
|
class="mantine-Stack-root mantine-1kb6t4k"
|
||||||
>
|
>
|
||||||
<button
|
<div
|
||||||
class="mantine-UnstyledButton-root mantine-1o6jmux"
|
class="mantine-Group-root mantine-6y1794"
|
||||||
type="button"
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Group-root mantine-6y1794"
|
class="mantine-Text-root mantine-Group-child mantine-3vx9ct"
|
||||||
>
|
>
|
||||||
<div
|
10.647382650365
|
||||||
class="mantine-Text-root mantine-Group-child mantine-14ayao3"
|
|
||||||
>
|
|
||||||
10.647382650365
|
|
||||||
</div>
|
|
||||||
<svg
|
|
||||||
class="mantine-gnzaph mantine-Group-child"
|
|
||||||
fill="none"
|
|
||||||
height="1em"
|
|
||||||
viewBox="0 0 7 4"
|
|
||||||
width="1em"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
clip-rule="evenodd"
|
|
||||||
d="M2.91916 3.69319C3.23963 4.04927 3.76166 4.04657 4.07971 3.69319L6.82329 0.644746C7.14377 0.288661 7.01636 0 6.53811 0H0.460749C-0.0172283 0 -0.14248 0.291357 0.17557 0.644746L2.91916 3.69319Z"
|
|
||||||
fill="#111111"
|
|
||||||
fill-rule="evenodd"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</button>
|
<svg
|
||||||
|
class="mantine-Group-child mantine-qg5oag"
|
||||||
|
fill="none"
|
||||||
|
height="1em"
|
||||||
|
viewBox="0 0 7 4"
|
||||||
|
width="1em"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="M2.91916 3.69319C3.23963 4.04927 3.76166 4.04657 4.07971 3.69319L6.82329 0.644746C7.14377 0.288661 7.01636 0 6.53811 0H0.460749C-0.0172283 0 -0.14248 0.291357 0.17557 0.644746L2.91916 3.69319Z"
|
||||||
|
fill="#111111"
|
||||||
|
fill-rule="evenodd"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-zvjvuq"
|
class="mantine-Text-root mantine-14xctlx"
|
||||||
>
|
>
|
||||||
(EUR 2441,02)
|
(EUR 2441,02)
|
||||||
</div>
|
</div>
|
||||||
@ -102,12 +98,12 @@ exports[`molecules::WalletBalance > renders without exploding 1`] = `
|
|||||||
class="mantine-Stack-root mantine-1kb6t4k"
|
class="mantine-Stack-root mantine-1kb6t4k"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-ywyx71"
|
class="mantine-Text-root mantine-xtp7ze"
|
||||||
>
|
>
|
||||||
Total
|
Total
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-1lh77dt"
|
class="mantine-Text-root mantine-pxv98s"
|
||||||
>
|
>
|
||||||
14.048212174412
|
14.048212174412
|
||||||
</div>
|
</div>
|
||||||
@ -116,12 +112,12 @@ exports[`molecules::WalletBalance > renders without exploding 1`] = `
|
|||||||
class="mantine-Stack-root mantine-1kb6t4k"
|
class="mantine-Stack-root mantine-1kb6t4k"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-ywyx71"
|
class="mantine-Text-root mantine-xtp7ze"
|
||||||
>
|
>
|
||||||
Reserved
|
Reserved
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-1lh77dt"
|
class="mantine-Text-root mantine-pxv98s"
|
||||||
>
|
>
|
||||||
2.874598526325
|
2.874598526325
|
||||||
</div>
|
</div>
|
||||||
@ -130,12 +126,12 @@ exports[`molecules::WalletBalance > renders without exploding 1`] = `
|
|||||||
class="mantine-Stack-root mantine-1kb6t4k"
|
class="mantine-Stack-root mantine-1kb6t4k"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-ywyx71"
|
class="mantine-Text-root mantine-xtp7ze"
|
||||||
>
|
>
|
||||||
Locked
|
Locked
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mantine-Text-root mantine-1lh77dt"
|
class="mantine-Text-root mantine-pxv98s"
|
||||||
>
|
>
|
||||||
0.854975624859
|
0.854975624859
|
||||||
</div>
|
</div>
|
||||||
@ -144,6 +140,6 @@ exports[`molecules::WalletBalance > renders without exploding 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</button>
|
||||||
</DocumentFragment>
|
</DocumentFragment>
|
||||||
`;
|
`;
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
import { Stack } from "@mantine/core";
|
|
||||||
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||||
|
import { AppProviders } from "@atoms/AppProviders";
|
||||||
import { Home } from ".";
|
import { Home } from ".";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -25,9 +25,9 @@ export default {
|
|||||||
|
|
||||||
const Template: ComponentStory<typeof Home> = () => {
|
const Template: ComponentStory<typeof Home> = () => {
|
||||||
return (
|
return (
|
||||||
<Stack>
|
<AppProviders>
|
||||||
<Home />
|
<Home />
|
||||||
</Stack>
|
</AppProviders>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,18 +15,18 @@
|
|||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
import { Space, Stack, Text } from "@mantine/core";
|
import { Box, Space, Stack, Text } from "@mantine/core";
|
||||||
import { LangKeys } from "@constants/lang/LangKeys";
|
import { LangKeys } from "@constants/lang/LangKeys";
|
||||||
import { CenteredLayout } from "@templates/CenteredLayout";
|
import { CenteredLayout } from "@templates/CenteredLayout";
|
||||||
import Logo from "@assets/logo.svg";
|
|
||||||
import { ConnectionProgress } from "@atoms/ConnectionProgress";
|
import { ConnectionProgress } from "@atoms/ConnectionProgress";
|
||||||
|
import Logo from "@assets/logo.svg";
|
||||||
|
|
||||||
export function Home() {
|
export function Home() {
|
||||||
return (
|
return (
|
||||||
<CenteredLayout>
|
<CenteredLayout>
|
||||||
<Stack align="center" justify="center" sx={{ flex: 1 }}>
|
<Stack align="center" justify="center" sx={{ flex: 1 }}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<img src={Logo} alt="Haveno" />
|
<Box component="img" src={Logo} alt="Haveno" />
|
||||||
<Text size="lg">
|
<Text size="lg">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id={LangKeys.AppHeading2}
|
id={LangKeys.AppHeading2}
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
import { Stack } from "@mantine/core";
|
|
||||||
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||||
|
import { AppProviders } from "@atoms/AppProviders";
|
||||||
import { Welcome } from ".";
|
import { Welcome } from ".";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -25,9 +25,9 @@ export default {
|
|||||||
|
|
||||||
const Template: ComponentStory<typeof Welcome> = () => {
|
const Template: ComponentStory<typeof Welcome> = () => {
|
||||||
return (
|
return (
|
||||||
<Stack>
|
<AppProviders>
|
||||||
<Welcome />
|
<Welcome />
|
||||||
</Stack>
|
</AppProviders>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,43 +21,57 @@ export const themeOverride: MantineThemeOverride = {
|
|||||||
headings: {
|
headings: {
|
||||||
fontFamily: "Inter",
|
fontFamily: "Inter",
|
||||||
},
|
},
|
||||||
|
other: {
|
||||||
|
buttonHeight: 48,
|
||||||
|
},
|
||||||
colors: {
|
colors: {
|
||||||
brand: [
|
blue: [
|
||||||
"#dff2ff",
|
"#E7F1FE",
|
||||||
"#b2caff",
|
"#BBD7FC",
|
||||||
"#b2d4ff",
|
"#8FBDF9",
|
||||||
"#83b8fc",
|
"#64A4F7",
|
||||||
"#539bf7",
|
"#388AF5",
|
||||||
"#257ff4",
|
"#0C70F3",
|
||||||
"#0b65da",
|
"#0b65da",
|
||||||
"#034fab",
|
"#074392",
|
||||||
"#00387b",
|
"#052D61",
|
||||||
"#00224d",
|
"#021631",
|
||||||
],
|
],
|
||||||
gray: [
|
gray: [
|
||||||
"#f8f9fa",
|
"#fcfcfc",
|
||||||
"#f1f3f5",
|
"#f1f3f5",
|
||||||
"#ececec",
|
"#ececec",
|
||||||
"#dee2e6",
|
"#dee2e6",
|
||||||
"#ced4da",
|
"#ced4da",
|
||||||
"#adb5bd",
|
"#adb5bd",
|
||||||
"#868e96",
|
"#888888",
|
||||||
"#495057",
|
"#515151",
|
||||||
"#343a40",
|
"#343a40",
|
||||||
"#111111",
|
"#111111",
|
||||||
],
|
],
|
||||||
success: [
|
green: [
|
||||||
"#e8f9eb",
|
"#EFF6EF",
|
||||||
"#cbe5cd",
|
"#D1E6D2",
|
||||||
"#abd3af",
|
"#B3D5B4",
|
||||||
"#8bc08f",
|
"#96C597",
|
||||||
"#6bad6d",
|
"#75B377",
|
||||||
"#529458",
|
"#5BA45D",
|
||||||
"#3e7347",
|
"#48844A",
|
||||||
"#2b5234",
|
"#366338",
|
||||||
"#173220",
|
"#244225",
|
||||||
"#011207",
|
"#122113",
|
||||||
|
],
|
||||||
|
red: [
|
||||||
|
"#FBECE9",
|
||||||
|
"#F5C9C2",
|
||||||
|
"#EEA69A",
|
||||||
|
"#E88373",
|
||||||
|
"#E2634E",
|
||||||
|
"#DB3E24",
|
||||||
|
"#AF321D",
|
||||||
|
"#832516",
|
||||||
|
"#58190E",
|
||||||
|
"#2C0C07",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
primaryColor: "brand",
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user