Skip to content

Commit

Permalink
refactor(notification): dismissDirection prop name has changed to sli… (
Browse files Browse the repository at this point in the history
#320)

* refactor(notification): dismissDirection prop name has changed to slideDirection to remove confusion

BREAKING CHANGE: Prop name change

fix #138

* fix(notification): fix namespace check

* fix(notification): namespace fix
  • Loading branch information
masoudmanson authored Feb 21, 2023
1 parent b54990a commit 09d8386
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
Binary file removed czifui-v0.0.43.tgz
Binary file not shown.
Binary file added czifui-v0.0.44.tgz
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "czifui",
"version": "0.0.43",
"version": "0.0.44",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"repository": {
Expand Down Expand Up @@ -52,7 +52,7 @@
"concurrently": "^6.0.0",
"css-font": "^1.2.0",
"cz-conventional-changelog": "^3.3.0",
"czifui": "file:czifui-v0.0.43.tgz",
"czifui": "file:czifui-v0.0.44.tgz",
"eslint": "^7.32.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/common/styles-dictionary/css/variables.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Do not edit directly
* Generated on Sat, 18 Feb 2023 23:22:38 GMT
* Generated on Tue, 21 Feb 2023 22:20:04 GMT
*/

:root {
Expand Down
2 changes: 1 addition & 1 deletion src/common/styles-dictionary/scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Sat, 18 Feb 2023 23:22:38 GMT
// Generated on Tue, 21 Feb 2023 22:20:04 GMT

$sds-font-letter-spacing-default: 0.3px;
$sds-font-letter-spacing-caps: 1px;
Expand Down
2 changes: 1 addition & 1 deletion src/core/Notification/Notification.namespace-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const NotificationNameSpaceTest = (props: NotificationProps) => {
<Notification
autoDismiss
dismissed={false}
dismissDirection="left"
slideDirection="left"
intent="info"
onClose={noop}
buttonOnClick={noop}
Expand Down
24 changes: 12 additions & 12 deletions src/core/Notification/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Demo = (props: Args): JSX.Element => {
onClose,
buttonOnClick,
buttonText,
dismissDirection,
slideDirection,
extraContent,
autoDismiss,
} = props;
Expand All @@ -34,7 +34,7 @@ const Demo = (props: Args): JSX.Element => {
<Notification
autoDismiss={autoDismiss}
dismissed={dismissed}
dismissDirection={dismissDirection}
slideDirection={slideDirection}
intent={intent}
onClose={onClose}
buttonOnClick={action("onClick")}
Expand Down Expand Up @@ -66,7 +66,7 @@ const Demo = (props: Args): JSX.Element => {
<Notification
autoDismiss={autoDismiss}
dismissed={dismissed}
dismissDirection={dismissDirection}
slideDirection={slideDirection}
intent={intent}
onClose={onClose}
{...props}
Expand Down Expand Up @@ -95,10 +95,6 @@ export default {
buttonOnClick: {
control: { type: "boolean" },
},
dismissDirection: {
control: { type: "radio" },
options: ["left", "right"],
},
extraContent: {
control: { type: "boolean" },
},
Expand All @@ -116,6 +112,10 @@ export default {
},
options: [action("onClick"), undefined],
},
slideDirection: {
control: { type: "radio" },
options: ["left", "right"],
},
},
component: Demo,
title: "Notification",
Expand All @@ -129,9 +129,9 @@ Default.args = {
autoDismiss: false,
buttonOnClick: false,
buttonText: "click me",
dismissDirection: "left",
extraContent: false,
intent: "success",
slideDirection: "left",
};

Default.parameters = {
Expand All @@ -150,11 +150,11 @@ const storyRow = {
const LivePreviewDemo = (props: Args): JSX.Element => {
return (
<div style={storyRow as React.CSSProperties}>
<Notification dismissDirection="left" intent="info" {...props}>
<Notification slideDirection="left" intent="info" {...props}>
this is a notification
</Notification>
<Notification
dismissDirection="left"
slideDirection="left"
intent="info"
buttonOnClick={action("onClick")}
buttonText="click me"
Expand All @@ -163,7 +163,7 @@ const LivePreviewDemo = (props: Args): JSX.Element => {
this is a notification
</Notification>
<Notification
dismissDirection="left"
slideDirection="left"
intent="info"
buttonOnClick={action("onClick")}
buttonText="click me"
Expand Down Expand Up @@ -192,7 +192,7 @@ LivePreview.parameters = {
const TestDemo = (props: Args): JSX.Element => {
return (
<Notification
dismissDirection="left"
slideDirection="left"
intent="info"
{...props}
data-testid="notification"
Expand Down
6 changes: 3 additions & 3 deletions src/core/Notification/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface NotificationProps {
buttonOnClick?: (event: React.SyntheticEvent) => void;
buttonText?: string;
dismissed?: boolean;
dismissDirection: "left" | "right";
slideDirection: "left" | "right";
extraContent?: boolean;
intent: "info" | "error" | "success" | "warning";
}
Expand All @@ -25,7 +25,7 @@ const Notification = ({
autoDismiss,
children,
dismissed,
dismissDirection = "left",
slideDirection = "left",
intent,
onClose,
buttonOnClick,
Expand Down Expand Up @@ -71,7 +71,7 @@ const Notification = ({
<>
<Slide
in={!hide}
direction={dismissDirection}
direction={slideDirection}
mountOnEnter
unmountOnExit
timeout={250}
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7754,9 +7754,9 @@ cz-conventional-changelog@^3.3.0:
optionalDependencies:
"@commitlint/load" ">6.1.1"

"czifui@file:czifui-v0.0.43.tgz":
version "0.0.43"
resolved "file:czifui-v0.0.43.tgz#a52f1c598aabdd7cb9671de05fc438f9f9153329"
"czifui@file:czifui-v0.0.44.tgz":
version "0.0.44"
resolved "file:czifui-v0.0.44.tgz#16459b590b623dd9b6711f247dca597fb9422d72"

damerau-levenshtein@^1.0.8:
version "1.0.8"
Expand Down

0 comments on commit 09d8386

Please sign in to comment.