Skip to content

Commit 6465a30

Browse files
committed
Convert New File/Folder to use Button
1 parent 0d8aeed commit 6465a30

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Diff for: client/modules/IDE/components/NewFileForm.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import PropTypes from 'prop-types';
22
import React from 'react';
33
import { domOnlyProps } from '../../../utils/reduxFormUtils';
44

5+
import Button from '../../../common/Button';
6+
57
class NewFileForm extends React.Component {
68
constructor(props) {
79
super(props);
@@ -33,7 +35,10 @@ class NewFileForm extends React.Component {
3335
{...domOnlyProps(name)}
3436
ref={(element) => { this.fileName = element; }}
3537
/>
36-
<input type="submit" value="Add File" aria-label="add file" />
38+
<Button
39+
type="submit"
40+
>Add File
41+
</Button>
3742
</div>
3843
{name.touched && name.error && <span className="form-error">{name.error}</span>}
3944
</form>

Diff for: client/modules/IDE/components/NewFolderForm.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import PropTypes from 'prop-types';
22
import React from 'react';
33
import { domOnlyProps } from '../../../utils/reduxFormUtils';
44

5+
import Button from '../../../common/Button';
6+
57
class NewFolderForm extends React.Component {
68
constructor(props) {
79
super(props);
@@ -34,7 +36,10 @@ class NewFolderForm extends React.Component {
3436
ref={(element) => { this.fileName = element; }}
3537
{...domOnlyProps(name)}
3638
/>
37-
<input type="submit" value="Add Folder" aria-label="add folder" />
39+
<Button
40+
type="submit"
41+
>Add Folder
42+
</Button>
3843
</div>
3944
{name.touched && name.error && <span className="form-error">{name.error}</span>}
4045
</form>

0 commit comments

Comments
 (0)