Skip to content

Commit e441bc8

Browse files
committed
fix BEM naming
1 parent de4562c commit e441bc8

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

packages/feedback/src/screenshot/components/ScreenshotEditor.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ export function makeScreenshotEditorComponent({ h, imageBuffer, dialog }: Factor
245245
return (
246246
<div class="editor">
247247
<style dangerouslySetInnerHTML={styles} />
248-
<div class="container--canvas" ref={canvasContainerRef}>
249-
<div class="container--crop-btn" style={{ position: 'absolute' }} ref={cropContainerRef}>
248+
<div class="editor__canvas-container" ref={canvasContainerRef}>
249+
<div class="editor__crop-container" style={{ position: 'absolute' }} ref={cropContainerRef}>
250250
<canvas style={{ position: 'absolute' }} ref={croppingRef}></canvas>
251251
<CropCorner
252252
left={croppingRect.startX}
@@ -278,7 +278,7 @@ export function makeScreenshotEditorComponent({ h, imageBuffer, dialog }: Factor
278278
top: Math.max(0, croppingRect.endY + 8),
279279
display: confirmCrop ? 'flex' : 'none',
280280
}}
281-
class="crop-btn-group"
281+
class="editor__crop-btn-group"
282282
>
283283
<button
284284
onClick={e => {
@@ -328,7 +328,7 @@ function CropCorner({
328328
}): VNode {
329329
return (
330330
<button
331-
class={`${corner} crop-btn`}
331+
class={`editor__crop-corner editor__crop-corner--${corner} `}
332332
style={{
333333
top: top,
334334
left: left,

packages/feedback/src/screenshot/components/ScreenshotInput.css.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ export function createScreenshotInputStyles(): HTMLStyleElement {
3838
);
3939
}
4040
41-
.container--canvas {
41+
.editor__canvas-container {
4242
width: 100%;
4343
height: 100%;
4444
position: relative;
4545
}
4646
47-
.container--canvas canvas {
47+
.editor__canvas-container canvas {
4848
width: 100%;
4949
height: 100%;
5050
object-fit: contain;
5151
}
5252
53-
.crop-btn-group {
53+
.editor__crop-btn-group {
5454
padding: 8px;
5555
gap: 8px;
5656
border-radius: var(--form-content-border-radius);
@@ -59,7 +59,7 @@ export function createScreenshotInputStyles(): HTMLStyleElement {
5959
position: absolute;
6060
}
6161
62-
.crop-btn {
62+
.editor__crop-corner {
6363
width: 30px;
6464
height: 30px;
6565
position: absolute;
@@ -68,22 +68,22 @@ export function createScreenshotInputStyles(): HTMLStyleElement {
6868
border-width: 3px;
6969
}
7070
71-
.top-left {
71+
.editor__crop-corner--top-left {
7272
cursor: nwse-resize;
7373
border-right: none;
7474
border-bottom: none;
7575
}
76-
.top-right {
76+
.editor__crop-corner--top-right {
7777
cursor: nesw-resize;
7878
border-left: none;
7979
border-bottom: none;
8080
}
81-
.bottom-left {
81+
.editor__crop-corner--bottom-left {
8282
cursor: nesw-resize;
8383
border-right: none;
8484
border-top: none;
8585
}
86-
.bottom-right {
86+
.editor__crop-corner--bottom-right {
8787
cursor: nwse-resize;
8888
border-left: none;
8989
border-top: none;

0 commit comments

Comments
 (0)