Skip to content

Commit d8a0a36

Browse files
committed
Add button style
1 parent 2994c44 commit d8a0a36

7 files changed

+15
-23
lines changed

assets/button-border-active.svg

+4
Loading

assets/button-border-hover.svg

+2-5
Loading

assets/button-border.svg

+2-5
Loading

src/camera.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ export function Camera({
322322
</div>
323323

324324
<button
325-
className="main"
326325
style={{
327326
margin: 'auto',
328327
marginBottom: 16,

src/error-boundary.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ export class ErrorBoundary extends Component {
5353
</div>
5454
<button
5555
style={{
56-
color: '#FF6060',
5756
marginTop: 32,
58-
fontSize: '1rem',
59-
padding: '8px 16px',
6057
flexShrink: 0,
6158
}}
6259
onClick={() => {

src/main.css

+7-8
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,27 @@ body {
4141

4242
button {
4343
font-family: inherit;
44-
border: 1px solid #ff606080;
45-
background-color: #ff606010;
44+
background-color: unset;
4645
cursor: pointer;
47-
}
48-
49-
button.main {
5046
font-size: 1.2em;
5147
color: #5ef5ff;
5248
width: 160px;
5349
height: 48px;
5450
flex-shrink: 0;
51+
border-image-source: url(../assets/button-border.svg);
52+
/* Half of the height of the button */
53+
border-image-slice: 24;
54+
border-image-width: auto;
5555
}
5656

5757
@media (hover: hover) and (pointer: fine) {
5858
button:hover {
59-
border: 1px solid #ff6060;
60-
background-color: #ff606040;
59+
border-image-source: url(../assets/button-border-hover.svg);
6160
}
6261
}
6362

6463
button:active {
65-
background-color: #ff606060;
64+
border-image-source: url(../assets/button-border-active.svg);
6665
}
6766

6867
button:focus {

src/result.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ export function Result({
196196
marginBottom: 16,
197197
}}
198198
onClick={onStartOver}
199-
className="main"
200199
>
201200
START OVER
202201
</button>

0 commit comments

Comments
 (0)