mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 21:13:01 +03:00
5934 create alert banner component (#5950)
Closes #5934 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
parent
701059007b
commit
d6fcb9cae8
@ -0,0 +1,22 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
const StyledBanner = styled.div`
|
||||
align-items: center;
|
||||
backdrop-filter: blur(5px);
|
||||
background: ${({ theme }) => theme.color.blue};
|
||||
display: flex;
|
||||
gap: ${({ theme }) => theme.spacing(3)};
|
||||
height: 40px;
|
||||
justify-content: center;
|
||||
padding: ${({ theme }) => theme.spacing(2) + ' ' + theme.spacing(3)};
|
||||
width: 100%;
|
||||
color: ${({ theme }) => theme.font.color.inverted};
|
||||
font-family: Inter;
|
||||
font-size: ${({ theme }) => theme.font.size.md};
|
||||
font-style: normal;
|
||||
font-weight: ${({ theme }) => theme.font.weight.medium};
|
||||
line-height: 150%;
|
||||
box-sizing: border-box;
|
||||
`;
|
||||
|
||||
export { StyledBanner as Banner };
|
@ -0,0 +1,34 @@
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { ComponentDecorator, IconRefresh } from 'twenty-ui';
|
||||
|
||||
import { Button } from '@/ui/input/button/components/Button';
|
||||
|
||||
import { Banner } from '../Banner';
|
||||
|
||||
const meta: Meta<typeof Banner> = {
|
||||
title: 'UI/Layout/Banner/Banner',
|
||||
component: Banner,
|
||||
decorators: [ComponentDecorator],
|
||||
render: (args) => (
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
<Banner {...args}>
|
||||
Sync lost with mailbox hello@twenty.com. Please reconnect for updates:
|
||||
<Button
|
||||
variant="secondary"
|
||||
title="Reconnect"
|
||||
Icon={IconRefresh}
|
||||
size="small"
|
||||
inverted
|
||||
/>
|
||||
</Banner>
|
||||
),
|
||||
argTypes: {
|
||||
as: { control: false },
|
||||
theme: { control: false },
|
||||
},
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof Banner>;
|
||||
|
||||
export const Default: Story = {};
|
Loading…
Reference in New Issue
Block a user