-
Notifications
You must be signed in to change notification settings - Fork 317
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
Feature/hadas/flex #456
Feature/hadas/flex #456
Conversation
…to feature/hadas/flex � Conflicts: � src/components/index.js
|
||
exports[`Flex renders correctly Horizontal display with children 1`] = ` | ||
<div | ||
className="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for some reason it does not add the class names to the test... what should I do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hadasfa where did you try the add a test with className
@@ -74,7 +74,11 @@ addParameters({ | |||
"*", | |||
"Accessibility", | |||
"Hooks" | |||
] | |||
], | |||
includeName: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hadasfa can we upgrade the version of Storybook (it might solve it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we currently in very advanced alpha version. I can try to update to the most recent alpha version (we are few patches behind), that's ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can upgrade but could be for a different PR
|
||
exports[`Flex renders correctly Horizontal display with children 1`] = ` | ||
<div | ||
className="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hadasfa where did you try the add a test with className
@@ -74,7 +74,11 @@ addParameters({ | |||
"*", | |||
"Accessibility", | |||
"Hooks" | |||
] | |||
], | |||
includeName: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can upgrade but could be for a different PR
({ className, id, elementType, direction, wrap, children, justify, align, gap, onClick, style }, ref) => { | ||
const componentRef = useRef(null); | ||
const mergedRef = useMergeRefs({ refs: [ref, componentRef] }); | ||
const overrideStyle = useMemo(() => ({ ...style, gap: `${gap}px` }), [style, gap]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hadasfa what happen if i don't pass any gap value?
const componentRef = useRef(null); | ||
const mergedRef = useMergeRefs({ refs: [ref, componentRef] }); | ||
const overrideStyle = useMemo(() => ({ ...style, gap: `${gap}px` }), [style, gap]); | ||
const Element = onClick ? Clickable : elementType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! 😎
Basic
npm run plop
) to create a new component.PropTypes
.Style
NewComponent.modules.scss
file inside of theNewComponent
folder.Storybook
/src/NewComponent/__stories__/NewComponent.stories.js
file.Tests