mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Add missing key prop to Dialog actions/secondaryActions
This commit is contained in:
@@ -60,6 +60,7 @@ export default class EventsContextAnalyzerDialog extends React.Component<
|
||||
const { onClose, eventsContextResult } = this.props;
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="close"
|
||||
label={<Trans>Close</Trans>}
|
||||
primary={true}
|
||||
onClick={this.props.onClose}
|
||||
|
@@ -59,11 +59,13 @@ export default class InstructionEditorDialog extends React.Component<
|
||||
} = this.props;
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="cancel"
|
||||
label={<Trans>Cancel</Trans>}
|
||||
primary={false}
|
||||
onClick={onCancel}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="ok"
|
||||
label={<Trans>Ok</Trans>}
|
||||
primary={true}
|
||||
keyboardFocused={false}
|
||||
|
@@ -28,15 +28,18 @@ export default class VariablesEditorDialog extends Component {
|
||||
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="cancel"
|
||||
label={<Trans>Cancel</Trans>}
|
||||
keyboardFocused={true}
|
||||
onClick={() => this.props.onClose(false)}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="remove"
|
||||
label={<Trans>Remove objects</Trans>}
|
||||
onClick={() => this.props.onClose(true, null)}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="move"
|
||||
label={<Trans>Move objects</Trans>}
|
||||
primary={true}
|
||||
onClick={() => this.props.onClose(true, this.state.selectedLayer)}
|
||||
|
@@ -139,11 +139,13 @@ export default class AboutDialog extends PureComponent<Props, *> {
|
||||
<Dialog
|
||||
actions={[
|
||||
<FlatButton
|
||||
key="website"
|
||||
label={<Trans>GDevelop Website</Trans>}
|
||||
primary={false}
|
||||
onClick={() => Window.openExternalURL('http://gdevelop-app.com')}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="close"
|
||||
label={<Trans>Close</Trans>}
|
||||
primary={false}
|
||||
onClick={onClose}
|
||||
|
@@ -13,11 +13,17 @@ export default class BetaIntroDialog extends Component {
|
||||
const { open, onClose } = this.props;
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="download"
|
||||
label={<Trans>Download full GDevelop desktop version</Trans>}
|
||||
primary={false}
|
||||
onClick={this._onOpenWebsite}
|
||||
/>,
|
||||
<FlatButton label={<Trans>Ok</Trans>} primary={true} onClick={onClose} />,
|
||||
<FlatButton
|
||||
label={<Trans>Ok</Trans>}
|
||||
primary={true}
|
||||
onClick={onClose}
|
||||
key="close"
|
||||
/>,
|
||||
];
|
||||
|
||||
return (
|
||||
|
@@ -23,6 +23,7 @@ export default class ChangelogDialog extends React.Component<Props, State> {
|
||||
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="close"
|
||||
label={<Trans>Close</Trans>}
|
||||
primary={true}
|
||||
onClick={onClose}
|
||||
|
@@ -30,11 +30,13 @@ export default class LayoutChooserDialog extends Component {
|
||||
render() {
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="cancel"
|
||||
label={<Trans>Cancel</Trans>}
|
||||
primary={false}
|
||||
onClick={this.props.onClose}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="choose"
|
||||
label={<Trans>Choose</Trans>}
|
||||
primary={true}
|
||||
keyboardFocused={true}
|
||||
|
@@ -91,6 +91,7 @@ export default class LanguageDialog extends Component<Props, State> {
|
||||
onClose(false);
|
||||
}}
|
||||
disabled={isLoadingLanguage}
|
||||
key="close"
|
||||
/>,
|
||||
]}
|
||||
secondaryActions={[
|
||||
|
@@ -156,6 +156,7 @@ export default class DirectionTools extends Component<Props, State> {
|
||||
label={<Trans>OK</Trans>}
|
||||
primary
|
||||
onClick={() => this.openPreview(false)}
|
||||
key="ok"
|
||||
/>
|
||||
}
|
||||
autoScrollBodyContent
|
||||
|
@@ -13,11 +13,13 @@ export class ObjectGroupEditorDialog extends Component {
|
||||
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="cancel"
|
||||
label={<Trans>Cancel</Trans>}
|
||||
keyboardFocused
|
||||
onClick={this.props.onCancel}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="apply"
|
||||
label={<Trans>Apply</Trans>}
|
||||
primary
|
||||
keyboardFocused
|
||||
|
@@ -213,11 +213,13 @@ export default class PlatformSpecificAssetsDialog extends React.Component<
|
||||
render() {
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="cancel"
|
||||
label={<Trans>Cancel</Trans>}
|
||||
primary={false}
|
||||
onClick={this.props.onClose}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="apply"
|
||||
label={<Trans>Apply</Trans>}
|
||||
primary={true}
|
||||
keyboardFocused={true}
|
||||
|
@@ -50,6 +50,7 @@ export default class CreateProjectDialog extends React.Component<Props, State> {
|
||||
title={<Trans>Create a new game</Trans>}
|
||||
actions={[
|
||||
<FlatButton
|
||||
key="close"
|
||||
label={<Trans>Close</Trans>}
|
||||
primary={false}
|
||||
onClick={onClose}
|
||||
|
@@ -34,11 +34,13 @@ export default class BrowserSaveDialog extends Component {
|
||||
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="download"
|
||||
label={<Trans>Download GDevelop desktop version</Trans>}
|
||||
primary={false}
|
||||
onClick={() => Window.openExternalURL('http://gdevelop-app.com')}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="close"
|
||||
label={<Trans>Close</Trans>}
|
||||
primary={false}
|
||||
onClick={onClose}
|
||||
|
@@ -185,11 +185,13 @@ class GenericResourcesChooser extends Component {
|
||||
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="close"
|
||||
label={<Trans>Close</Trans>}
|
||||
primary={false}
|
||||
onClick={this._onClose}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="choose"
|
||||
label={<Trans>Choose</Trans>}
|
||||
primary={false}
|
||||
disabled={!this.state.chosenResourceUrl}
|
||||
|
@@ -22,11 +22,13 @@ export default class SetupGridDialog extends Component {
|
||||
render() {
|
||||
const actions = [
|
||||
<FlatButton
|
||||
key="cancel"
|
||||
label={<Trans>Cancel</Trans>}
|
||||
primary={false}
|
||||
onClick={this.props.onCancel}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="apply"
|
||||
label={<Trans>Apply</Trans>}
|
||||
primary={true}
|
||||
keyboardFocused={true}
|
||||
|
Reference in New Issue
Block a user