File tree Expand file tree Collapse file tree 1 file changed +19
-20
lines changed
packages/math-input/src/components/keypad Expand file tree Collapse file tree 1 file changed +19
-20
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,24 @@ export interface KeypadProps {
3939 ) => void ;
4040}
4141
42+ const tabsStyles = {
43+ tab : {
44+ marginBlockStart : sizing . size_080 ,
45+ marginBlockEnd : sizing . size_080 ,
46+ } ,
47+ tablist : {
48+ gap : sizing . size_080 ,
49+ paddingInline : sizing . size_080 ,
50+ } ,
51+ tabPanel : {
52+ display : "flex" ,
53+ flexDirection : "row" ,
54+ flexWrap : "nowrap" ,
55+ backgroundColor : semanticColor . core . background . disabled . strong ,
56+ direction : "ltr" ,
57+ } ,
58+ } as const ;
59+
4260// The main (v2) Keypad. Use this component to present an accessible, onscreen
4361// keypad to learners for entering math expressions.
4462export default function Keypad ( { extraKeys = [ ] , ...props } : KeypadProps ) {
@@ -125,26 +143,7 @@ export default function Keypad({extraKeys = [], ...props}: KeypadProps) {
125143 onTabSelected = { ( newSelectedPage : string ) => {
126144 setSelectedPage ( newSelectedPage as KeypadPageType ) ;
127145 } }
128- styles = { {
129- tab : {
130- marginBlockStart : sizing . size_080 ,
131- marginBlockEnd : sizing . size_080 ,
132- } ,
133- tablist : {
134- gap : sizing . size_080 ,
135- paddingInline : sizing . size_080 ,
136- } ,
137- tabPanel : {
138- display : "flex" ,
139- flexDirection : "row" ,
140- flexWrap : "nowrap" ,
141- backgroundColor :
142- semanticColor . core . background . disabled . strong ,
143- // Even in RTL languages, math is LTR.
144- // So we force this component to always render LTR
145- direction : "ltr" ,
146- } ,
147- } }
146+ styles = { tabsStyles }
148147 />
149148 </ View >
150149 </ View >
You can’t perform that action at this time.
0 commit comments