Skip to content

Commit 7b9b809

Browse files
committed
fix(pf3): step buttons fix css and props
1 parent 65b2324 commit 7b9b809

3 files changed

Lines changed: 18 additions & 78 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
.margin-left-3 {
22
margin-left: 3px;
33
}
4+
5+
.ddorg__pf3-component-mapper__wizard__buttons {
6+
margin-left: 3px;
7+
margin-right: 20px;
8+
}

packages/pf3-component-mapper/src/files/wizard/step-buttons.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ const WizardStepButtons = ({ disableBack, handlePrev, nextStep, formOptions, han
6161
<Wizard.Footer>
6262
{formOptions.onCancel && (
6363
<Button
64-
style={{ marginRight: 20 }}
65-
className="margin-left-3"
64+
className="ddorg__pf3-component-mapper__wizard__buttons"
6665
type="button"
6766
variant="contained"
6867
color="secondary"
@@ -102,8 +101,4 @@ WizardStepButtons.propTypes = {
102101
}).isRequired
103102
};
104103

105-
WizardStepButtons.defaultProps = {
106-
formOptions: undefined
107-
};
108-
109104
export default WizardStepButtons;

packages/pf3-component-mapper/src/tests/__snapshots__/wizard.test.js.snap

Lines changed: 12 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -553,14 +553,9 @@ exports[`<Wizard /> should render Wizard correctly 1`] = `
553553
className="wizard-pf-footer modal-footer"
554554
>
555555
<Button
556-
className="margin-left-3"
556+
className="ddorg__pf3-component-mapper__wizard__buttons"
557557
color="secondary"
558558
onClick={[Function]}
559-
style={
560-
Object {
561-
"marginRight": 20,
562-
}
563-
}
564559
type="button"
565560
variant="contained"
566561
>
@@ -569,27 +564,17 @@ exports[`<Wizard /> should render Wizard correctly 1`] = `
569564
block={false}
570565
bsClass="btn"
571566
bsStyle="contained"
572-
className="margin-left-3"
567+
className="ddorg__pf3-component-mapper__wizard__buttons"
573568
color="secondary"
574569
disabled={false}
575570
onClick={[Function]}
576-
style={
577-
Object {
578-
"marginRight": 20,
579-
}
580-
}
581571
type="button"
582572
>
583573
<button
584-
className="margin-left-3 btn btn-contained"
574+
className="ddorg__pf3-component-mapper__wizard__buttons btn btn-contained"
585575
color="secondary"
586576
disabled={false}
587577
onClick={[Function]}
588-
style={
589-
Object {
590-
"marginRight": 20,
591-
}
592-
}
593578
type="button"
594579
>
595580
Cancel
@@ -1362,14 +1347,9 @@ exports[`<Wizard /> should render Wizard with conditional steps correctly 1`] =
13621347
className="wizard-pf-footer modal-footer"
13631348
>
13641349
<Button
1365-
className="margin-left-3"
1350+
className="ddorg__pf3-component-mapper__wizard__buttons"
13661351
color="secondary"
13671352
onClick={[Function]}
1368-
style={
1369-
Object {
1370-
"marginRight": 20,
1371-
}
1372-
}
13731353
type="button"
13741354
variant="contained"
13751355
>
@@ -1378,27 +1358,17 @@ exports[`<Wizard /> should render Wizard with conditional steps correctly 1`] =
13781358
block={false}
13791359
bsClass="btn"
13801360
bsStyle="contained"
1381-
className="margin-left-3"
1361+
className="ddorg__pf3-component-mapper__wizard__buttons"
13821362
color="secondary"
13831363
disabled={false}
13841364
onClick={[Function]}
1385-
style={
1386-
Object {
1387-
"marginRight": 20,
1388-
}
1389-
}
13901365
type="button"
13911366
>
13921367
<button
1393-
className="margin-left-3 btn btn-contained"
1368+
className="ddorg__pf3-component-mapper__wizard__buttons btn btn-contained"
13941369
color="secondary"
13951370
disabled={false}
13961371
onClick={[Function]}
1397-
style={
1398-
Object {
1399-
"marginRight": 20,
1400-
}
1401-
}
14021372
type="button"
14031373
>
14041374
Cancel
@@ -2361,14 +2331,9 @@ exports[`<Wizard /> should render Wizard with stepsInfo correctly 1`] = `
23612331
className="wizard-pf-footer modal-footer"
23622332
>
23632333
<Button
2364-
className="margin-left-3"
2334+
className="ddorg__pf3-component-mapper__wizard__buttons"
23652335
color="secondary"
23662336
onClick={[Function]}
2367-
style={
2368-
Object {
2369-
"marginRight": 20,
2370-
}
2371-
}
23722337
type="button"
23732338
variant="contained"
23742339
>
@@ -2377,27 +2342,17 @@ exports[`<Wizard /> should render Wizard with stepsInfo correctly 1`] = `
23772342
block={false}
23782343
bsClass="btn"
23792344
bsStyle="contained"
2380-
className="margin-left-3"
2345+
className="ddorg__pf3-component-mapper__wizard__buttons"
23812346
color="secondary"
23822347
disabled={false}
23832348
onClick={[Function]}
2384-
style={
2385-
Object {
2386-
"marginRight": 20,
2387-
}
2388-
}
23892349
type="button"
23902350
>
23912351
<button
2392-
className="margin-left-3 btn btn-contained"
2352+
className="ddorg__pf3-component-mapper__wizard__buttons btn btn-contained"
23932353
color="secondary"
23942354
disabled={false}
23952355
onClick={[Function]}
2396-
style={
2397-
Object {
2398-
"marginRight": 20,
2399-
}
2400-
}
24012356
type="button"
24022357
>
24032358
Cancel
@@ -3138,14 +3093,9 @@ exports[`<Wizard /> should render Wizard with title correctly 1`] = `
31383093
className="wizard-pf-footer modal-footer"
31393094
>
31403095
<Button
3141-
className="margin-left-3"
3096+
className="ddorg__pf3-component-mapper__wizard__buttons"
31423097
color="secondary"
31433098
onClick={[Function]}
3144-
style={
3145-
Object {
3146-
"marginRight": 20,
3147-
}
3148-
}
31493099
type="button"
31503100
variant="contained"
31513101
>
@@ -3154,27 +3104,17 @@ exports[`<Wizard /> should render Wizard with title correctly 1`] = `
31543104
block={false}
31553105
bsClass="btn"
31563106
bsStyle="contained"
3157-
className="margin-left-3"
3107+
className="ddorg__pf3-component-mapper__wizard__buttons"
31583108
color="secondary"
31593109
disabled={false}
31603110
onClick={[Function]}
3161-
style={
3162-
Object {
3163-
"marginRight": 20,
3164-
}
3165-
}
31663111
type="button"
31673112
>
31683113
<button
3169-
className="margin-left-3 btn btn-contained"
3114+
className="ddorg__pf3-component-mapper__wizard__buttons btn btn-contained"
31703115
color="secondary"
31713116
disabled={false}
31723117
onClick={[Function]}
3173-
style={
3174-
Object {
3175-
"marginRight": 20,
3176-
}
3177-
}
31783118
type="button"
31793119
>
31803120
Cancel

0 commit comments

Comments
 (0)