File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 11import { useCallback } from 'react' ;
22import { Graphics , Container } from '@inlet/react-pixi' ;
3+ import { CodeIcon } from './primatives/CodeIcon' ;
34
45import FastBitmapText from './primatives/FastBitmapText' ;
56
@@ -74,6 +75,9 @@ const CellPixiReact = (props: CellPixiReactProps) => {
7475 visible = { props . renderText }
7576 />
7677 < Graphics draw = { draw_outline } />
78+ { props . type === 'PYTHON' && (
79+ < CodeIcon x_pos = { x_pos } y_pos = { y_pos } > </ CodeIcon >
80+ ) }
7781 </ Container >
7882 ) ;
7983} ;
Original file line number Diff line number Diff line change 1+ import { BitmapText } from '@inlet/react-pixi' ;
2+ import { colors } from '../../../../theme/colors' ;
3+
4+ interface CodeIconProps {
5+ x_pos : number ;
6+ y_pos : number ;
7+ }
8+
9+ export const CodeIcon = ( props : CodeIconProps ) => {
10+ const { x_pos, y_pos } = props ;
11+
12+ return (
13+ < BitmapText
14+ x = { x_pos + 1 }
15+ y = { y_pos - 0.5 }
16+ style = { { fontName : 'OpenSans' , fontSize : 4 } }
17+ tint = { colors . cellColorUserPython }
18+ align = "left"
19+ text = "</>"
20+ > </ BitmapText >
21+ ) ;
22+ } ;
You can’t perform that action at this time.
0 commit comments