Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Add buttons to titles #172

wants to merge 1 commit into from

Conversation

fallnlove
Copy link

No description provided.

<Box display="flex">
<ShowPresetButton className='block' onClick={onShow} active={data.shown}/>
<IconButton color="primary" onClick={() => {
data.settings.preset = "title_left.svg";
Copy link
Contributor

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";
Copy link
Contributor

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";
Copy link
Contributor

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";
Copy link
Contributor

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

@irdkwmnsb
Copy link
Contributor

Closed in favour of #175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants