-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #461 from AppQuality/develop
release 20241216
- Loading branch information
Showing
10 changed files
with
163 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Meta } from "@storybook/react"; | ||
import { ComponentProps } from "react"; | ||
import { Modal } from "."; | ||
import { Placeholder } from "../placeholder"; | ||
|
||
type Args = ComponentProps<typeof Modal.Header> & {}; | ||
|
||
const meta = { | ||
title: "Molecules/Modals/Header", | ||
component: Modal, | ||
parameters: { | ||
design: { | ||
type: "figma", | ||
url: "https://www.figma.com/file/BSagFENAXxMy2UpnQVa0mI/UNGUESS-%7C-Garden?node-id=102%3A124", | ||
}, | ||
}, | ||
render: (args) => { | ||
return ( | ||
<Modal> | ||
<Modal.Header {...args}> | ||
{args.title ? args.title : <Placeholder />} | ||
</Modal.Header> | ||
</Modal> | ||
); | ||
}, | ||
argTypes: { | ||
title: { | ||
control: { | ||
type: "text", | ||
}, | ||
}, | ||
isDanger: { | ||
control: { | ||
type: "boolean", | ||
}, | ||
}, | ||
}, | ||
args: { | ||
title: undefined, | ||
isDanger: false, | ||
}, | ||
} satisfies Meta<Args>; | ||
|
||
export default meta; | ||
|
||
export const Default = { | ||
args: {}, | ||
}; | ||
|
||
export const Danger = { | ||
args: { | ||
title: "Cool title", | ||
isDanger: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Alert as ZendeskAlert, Title as ZendeskTitle, Close as ZendeskClose } from '@zendeskgarden/react-notifications'; | ||
import { IAlertProps } from '@zendeskgarden/react-notifications'; | ||
|
||
|
||
export interface AlertArgs extends IAlertProps {} | ||
|
||
const Alert = (props: AlertArgs) => <ZendeskAlert {...props}/>; | ||
Alert.Title = ZendeskTitle; | ||
Alert.Close = ZendeskClose; | ||
|
||
export { Alert }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import styled from "styled-components"; | ||
|
||
const Wrapper = styled.span` | ||
display: inline-block; | ||
const Wrapper = styled.span<{ | ||
display: NonNullable<React.CSSProperties["display"]>; | ||
}>` | ||
display: ${(props) => props.display}; | ||
padding: 10px; | ||
background-color: #ccc; | ||
.content { | ||
display: inline-block; | ||
padding: 10px; | ||
background-color: #fff; | ||
} | ||
border: 10px solid #e0e0e0; | ||
background-color: #fff; | ||
width: ${(props) => (["block"].includes(props.display) ? "100%" : "auto")}; | ||
`; | ||
|
||
const Placeholder = () => { | ||
return ( | ||
<Wrapper> | ||
<span className="content">PLACEHOLDER</span> | ||
</Wrapper> | ||
); | ||
const Placeholder = ({ | ||
display = "inline-block", | ||
}: { | ||
display?: React.CSSProperties["display"]; | ||
}) => { | ||
return <Wrapper display={display}>PLACEHOLDER</Wrapper>; | ||
}; | ||
|
||
export { Placeholder }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters