Comments (14)
Hey @usulpro hadn't had time to work on it last week, but working on it today and this weekend.
from storybook-addon-material-ui.
Hey so if it hasn't been claimed, may I work on this issue?
from storybook-addon-material-ui.
You are welcome!
from storybook-addon-material-ui.
OkI'll work on this thanks
from storybook-addon-material-ui.
Hi @dantesolis!
just wanted to know how you're doing with it and whether you need any help?
from storybook-addon-material-ui.
@usulpro just to be clear, when you say 'addition of new properties to objects'. You mean to declare them inside the
const propTypes = {
open: React.PropTypes.bool.isRequired,
themeName: React.PropTypes.string.isRequired,
theme: React.PropTypes.object.isRequired,
muiTheme: React.PropTypes.object.isRequired,
fullTheme: React.PropTypes.func.isRequired,
collapseList: React.PropTypes.func.isRequired,
shouldComponentUpdate: React.PropTypes.bool.isRequired,
shouldShowData: React.PropTypes.bool.isRequired,
};
and the use them in the this.state
declaration? I'm a bit lost 🙃
from storybook-addon-material-ui.
@dantesolis let me clarify this task:
'addition of new properties to objects'
-
'objects'
it's a theme object. You can find it here (it's just an example instance).
You can also see it in theaddon panel
when you start storybook by 'npm start'
And you have an access to all properties via theme editor
that's all the same object.
- 'new properties' means simple fields of objects in the
theme object
. As an example:palette.textColor
- it's an existing property,palette.userColor
- it's a new property wich we would like to add here. Now we already have a possibility to add such a properties by just editingtheme object
in theaddon panel
but not in thetheme editor
- 'addition of new properties' it's about to add some button in the
theme editor
wich could add a new property with somedefault name(ability to set name) and value.
for this you need to see:
- ThemePropBlock.js#L96-L105 it's a place where each separated property is rendered.
- and this ThemePropItem.js#L61 - implementation of property line
Tip:
you can create a new component based on ThemePropItem
and put it in the end of 'ThemePropBlock' wich could have a (+) button instead of [ ]
ps
sorry for my english, I hope I'm clearly described all. Feel free to ask any question if you need.
from storybook-addon-material-ui.
@usulpro hey man your english is perfect and you explained perfectly. I'm still having problems
wrapping my head around the code.
But wanted to make sure if I'm on the right path or not. The idea is to allow the user to add a property to each individual object. Using the palette
object as an example...
from storybook-addon-material-ui.
@dantesolis It looks greate!
The only two things I would add:
- input field for value
- maybe better the tip text to be 'New prop name' - to clarify that new prop will be added
And if it possible could you check the appearance with different width of sidebar? (now it can't be changed by mouse but it should) I suppose it worth to add display: flex
to wraping div and set the minWidth
of input elements.
from storybook-addon-material-ui.
And one more thing :)
Need to setup theme supported appearance - colors should be taken from context
.
here is an example: https://github.com/sm-react/storybook-addon-material-ui/blob/master/src/components/ThemePropItem.js#L206 or just ask me if you have an issue
from storybook-addon-material-ui.
Hey man so I'm pushing what I have so you can see it, it's far from done, but I'm getting confused on how to pass the value of my input back into the ThemePropBlock.js
I created a function valueUserInputHandler(event){...}
to handle the state and the change of that component. I'm sorry for the stupid questions, new to React and this, but I still will like to contribute on it.
from storybook-addon-material-ui.
Dont't worry @dantesolis, It's a place where you are welcomed to start hacking React.
Just make a PR to me to let me see you code. You'll be able to update it as you progress.
from storybook-addon-material-ui.
@usulpro thanks man, that's what I'm looking for to learn more about react and contribute. I'm doing a PR right now
from storybook-addon-material-ui.
sidebar will be deprecated
from storybook-addon-material-ui.
Related Issues (20)
- Breaks Storyshots HOT 1
- MuiThemeProvider not Working with Separate Storybook Project HOT 3
- Support for 4.x version HOT 10
- Cannot download theme HOT 2
- Is it possible to show properties other than primary, secondary and error? HOT 1
- Unable to get themes to work on story components HOT 12
- Angular Compatibility? HOT 2
- Is there support for TSX with this?
- Not passing themes to muiTheme() causes rendering errors HOT 5
- Possible to add globally to all stories?
- Support Storybook v6.1 HOT 3
- Wrong behaviour with Storybook 6.X HOT 4
- Localization HOT 3
- Material-ui V5 (next) HOT 2
- Support for Material UI Core 5.x HOT 6
- Custom themes are not displaying when switch HOT 1
- Consider making MUI peer dependency deps prominent in docs HOT 2
- Decorator Adding Extra Div HOT 2
- Addon doesn't show well HOT 15
- Plugin triggers React warnings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storybook-addon-material-ui.