mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-07-01 16:26:57 +00:00
feat(design-system): port molecules
This commit is contained in:
parent
ea2683da00
commit
7be4f0d1e7
70 changed files with 538 additions and 487 deletions
20
src/design-system/molecules/user-popover/BUILD.bazel
Normal file
20
src/design-system/molecules/user-popover/BUILD.bazel
Normal file
|
@ -0,0 +1,20 @@
|
|||
load("//:hack/react.bzl", "react_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
react_library(
|
||||
name = "user-popover",
|
||||
deps = [
|
||||
"next",
|
||||
"react",
|
||||
"react-icons",
|
||||
"styled-components",
|
||||
"//src/design-system/atoms/breakpoints",
|
||||
"//src/design-system/atoms/colors",
|
||||
"//src/design-system/atoms/timings",
|
||||
"//src/design-system/molecules/user-avatar-group",
|
||||
"//src/design-system/shared-types",
|
||||
"@types/react",
|
||||
"@types/styled-components",
|
||||
],
|
||||
)
|
|
@ -0,0 +1,18 @@
|
|||
import { user } from 'roleypoly/src/design-system/shared-types/storyData';
|
||||
import * as React from 'react';
|
||||
import { UserPopover as UserPopoverComponent } from './UserPopover';
|
||||
import { PopoverBase } from 'roleypoly/src/design-system/atoms/popover/Popover.styled';
|
||||
|
||||
export default {
|
||||
title: 'Molecules/User Popover',
|
||||
component: UserPopoverComponent,
|
||||
args: {
|
||||
user,
|
||||
},
|
||||
};
|
||||
|
||||
export const UserPopover = (args) => (
|
||||
<PopoverBase active>
|
||||
<UserPopoverComponent {...args} />
|
||||
</PopoverBase>
|
||||
);
|
|
@ -1,13 +0,0 @@
|
|||
import { user } from 'hack/fixtures/storyData';
|
||||
import { moleculeStories } from 'molecules/molecules.story';
|
||||
import * as React from 'react';
|
||||
import { UserPopover } from './UserPopover';
|
||||
import { PopoverBase } from 'atoms/popover/Popover.styled';
|
||||
|
||||
const story = moleculeStories('User Popover', module);
|
||||
|
||||
story.add('User Popover', () => (
|
||||
<PopoverBase active>
|
||||
<UserPopover user={user} />
|
||||
</PopoverBase>
|
||||
));
|
|
@ -1,6 +1,6 @@
|
|||
import styled from 'styled-components';
|
||||
import { palette } from 'atoms/colors';
|
||||
import { transitions } from 'atoms/timings';
|
||||
import { palette } from 'roleypoly/src/design-system/atoms/colors';
|
||||
import { transitions } from 'roleypoly/src/design-system/atoms/timings';
|
||||
|
||||
export const Base = styled.div`
|
||||
text-align: right;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import * as React from 'react';
|
||||
import { DiscordUser } from '@roleypoly/rpc/shared';
|
||||
import { UserAvatarGroup } from 'molecules/user-avatar-group';
|
||||
import { DiscordUser } from 'roleypoly/src/design-system/shared-types';
|
||||
import { UserAvatarGroup } from 'roleypoly/src/design-system/molecules/user-avatar-group';
|
||||
import { Base, NavAction } from './UserPopover.styled';
|
||||
import { GoGear, GoSignOut } from 'react-icons/go';
|
||||
import Link from 'next/link';
|
||||
|
||||
type UserPopoverProps = {
|
||||
user: DiscordUser.AsObject;
|
||||
user: DiscordUser;
|
||||
};
|
||||
|
||||
export const UserPopover = (props: UserPopoverProps) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue