Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(web): add actionItem to beta #497

Merged
merged 12 commits into from
Jun 28, 2023
15 changes: 15 additions & 0 deletions web/src/beta/components/ActionItem/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Meta, StoryObj } from "@storybook/react";

import ActionItem from ".";

export default {
component: ActionItem,
} as Meta;

type Story = StoryObj<typeof ActionItem>;

export const Default: Story = {
args: {
title: "NewPage",
},
};
44 changes: 44 additions & 0 deletions web/src/beta/components/ActionItem/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import styled from "@emotion/styled";
import { FC } from "react";

import Icon from "../Icon";

type Props = {
icon: string;
title: string;
onClick?: () => void;
};

const ActionItem: FC<Props> = ({ icon, title, onClick }) => {
return (
<Box onClick={onClick}>
<Icon icon={icon} style={{ width: "8px", height: "8px" }} />
KaWaite marked this conversation as resolved.
Show resolved Hide resolved
<Text>{title}</Text>
</Box>
);
};

const Box = styled.div`
atnagata marked this conversation as resolved.
Show resolved Hide resolved
display: flex;
flex-direction: row;
align-items: center;
padding: 4px 12px;
gap: 8px;

height: 28px;

background: #232226;
:hover {
background: #2b2a2f;
}
isoppp marked this conversation as resolved.
Show resolved Hide resolved
`;

const Text = styled.text`
font-family: "Noto Sans";
font-weight: 400;
font-size: 12px;

color: #c7c5c5;
`;

export default ActionItem;