-
-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededneeds:discussionFurther information is requestedFurther information is requested
Milestone
Description
What:
I propose to consider support of custom prop aliases (or aliases extensions).
Why:
- To suit different projects' needs
- To have more power with responsive props, while not violating the core principle of Atomic layout (if shipped by default)
How:
- Developers can create a custom prop by using the exposed API on the
Layoutlevel:
import Layout from 'atomic-layout'
Layout.configure({
propAliases: {
textAlign: {
output: ['text-align'],
transformValue: optionalTransformer,
}
}
})- All custom prop aliases are responsive by default
- Custom prop alias supports value transformer to be able to transform the supplied value
- Put down an agreed API
- Extend the
Layoutclass - Expose default utils (i.e.
transformNumeric) for developers to reuse the library's logic when writing custom aliases - Provide tests
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededneeds:discussionFurther information is requestedFurther information is requested