-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
add grid component #26
Conversation
import ColorsControl from '../../controls/ColorsControl' | ||
|
||
const GridPanel = () => { | ||
const [propsList] = useState([ |
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.
tu n'as pas besoin de passer par un state ici, tu peux simplement mettre les composants dans le jsx :
<TextControl label="Area" name="gridArea" />
<TextControl label="Template areas" name="gridTemplateAreas" />
<TextControl label="Gap" name="gridGap" />
...
src/utils/defaultProps.ts
Outdated
@@ -248,6 +255,10 @@ export const DEFAULT_PROPS: PreviewDefaultProps = { | |||
...FormErrorMessage.defaultProps, | |||
children: 'Error message', | |||
}, | |||
Grid: { | |||
...Grid.defaultProps, | |||
children: 'Lorem Ipsum', |
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.
Pas besoin de renseigner le children, le composant va recevoir d'autres composants
const GridPanel = () => { | ||
return ( | ||
<> | ||
<ColorsControl withFullColor label="Color" name="bg" enableHues /> |
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.
tu peux le retirer il est déjà présent dans le panel backgrounds
* add grid component * update grid props & grid panel * remove colors control Co-authored-by: Baptiste Adrien <adrien.baptiste@gmail.com>
No description provided.