-
Notifications
You must be signed in to change notification settings - Fork 15
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 buttons to titles #172
Conversation
<Box display="flex"> | ||
<ShowPresetButton className='block' onClick={onShow} active={data.shown}/> | ||
<IconButton color="primary" onClick={() => { | ||
data.settings.preset = "title_left.svg"; |
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.
Hard code
onEdit(data); | ||
}}>L</IconButton> | ||
<IconButton color="primary" onClick={() => { | ||
data.settings.preset = "title_right.svg"; |
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.
Hard code
<Box display="flex"> | ||
<ShowPresetButton className='block' onClick={onShow} active={data.shown}/> | ||
<IconButton color="primary" onClick={() => { | ||
data.settings.preset = "title_left.svg"; |
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.
Hardcoded value. This preset needs to be able to change. It's good for what it's worth. But maybe we can add some sort of logic or interface to be able to add more such buttons, or less of such buttons?
<Box display="flex"> | ||
<ShowPresetButton className='block' onClick={onShow} active={data.shown}/> | ||
<IconButton color="primary" onClick={() => { | ||
data.settings.preset = "title_left.svg"; |
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.
React doesn't like when props are mutated. Here you are mutating data
. This is prone to bugs
Closed in favour of #175 |
No description provided.