Skip to content

Commit 37c548b

Browse files
tinahirCompuIves
authored andcommitted
fix(template): Template buttons are not accessible (codesandbox#1761)
1 parent 5039794 commit 37c548b

File tree

2 files changed

+4
-4
lines changed
  • packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/Template

2 files changed

+4
-4
lines changed

packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/Template/elements.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled, { css } from 'styled-components';
22

3-
export const Container = styled.div`
3+
export const Button = styled.button`
44
transition: 0.3s ease all;
55
display: inline-block;
66
padding: 1em;

packages/app/src/app/pages/Dashboard/Content/CreateNewSandbox/Modal/Template/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import getIcon from '@codesandbox/common/lib/templates/icons';
33

44
import { ENTER } from '@codesandbox/common/lib/utils/keycodes';
5-
import { Container, IconContainer, Title, SubTitle } from './elements';
5+
import { Button, IconContainer, Title, SubTitle } from './elements';
66

77
export default ({ template, subtitle, selectTemplate, small }) => {
88
const Icon = getIcon(template.name);
@@ -12,7 +12,7 @@ export default ({ template, subtitle, selectTemplate, small }) => {
1212
const size = template.name === 'next' ? 64 : 32;
1313

1414
return (
15-
<Container
15+
<Button
1616
onClick={select}
1717
color={template.color}
1818
onKeyDown={e => {
@@ -31,6 +31,6 @@ export default ({ template, subtitle, selectTemplate, small }) => {
3131
<IconContainer>
3232
<Icon width={small ? 24 : size} height={small ? 24 : 32} />
3333
</IconContainer>
34-
</Container>
34+
</Button>
3535
);
3636
};

0 commit comments

Comments
 (0)