File tree Expand file tree Collapse file tree 6 files changed +17
-5
lines changed
components/webui/client/src
pages/SearchPage/SearchControls/Presto/GuidedControls Expand file tree Collapse file tree 6 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,10 @@ const {Text} = Typography;
1313 *
1414 * @param props
1515 * @param props.children The label text to display.
16+ * @param props.width Optional width for the label.
1617 * @return
1718 */
18- const InputLabel = ( { children} : { children : React . ReactNode } ) => {
19+ const InputLabel = ( { children, width } : { children : React . ReactNode ; width ?: string | number } ) => {
1920 const { token} = theme . useToken ( ) ;
2021
2122 return (
@@ -26,6 +27,7 @@ const InputLabel = ({children}: {children: React.ReactNode}) => {
2627 borderBottomLeftRadius : `${ token . borderRadius } px` ,
2728 borderTopLeftRadius : `${ token . borderRadius } px` ,
2829 fontSize : token . fontSize ,
30+ minWidth : width ,
2931 } }
3032 >
3133 { children }
Original file line number Diff line number Diff line change 11import InputLabel from "../../../../../components/InputLabel" ;
22import DatasetSelect from "../../Dataset/DatasetSelect" ;
33import guidedGrid from "./index.module.css" ;
4+ import { LABEL_WIDTH } from "./typings" ;
45
56
67/**
@@ -11,7 +12,7 @@ import guidedGrid from "./index.module.css";
1112const From = ( ) => {
1213 return (
1314 < div className = { guidedGrid [ "gridItem" ] } >
14- < InputLabel > FROM</ InputLabel >
15+ < InputLabel width = { LABEL_WIDTH } > FROM</ InputLabel >
1516 < DatasetSelect
1617 className = {
1718 `${ guidedGrid [ "noLeftBorderRadiusSelect" ] } ${
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import useSearchStore from "../../../SearchState/index";
55import usePrestoSearchState from "../../../SearchState/Presto" ;
66import { SEARCH_UI_STATE } from "../../../SearchState/typings" ;
77import guidedGrid from "./index.module.css" ;
8+ import { LABEL_WIDTH } from "./typings" ;
89
910
1011/**
@@ -21,7 +22,7 @@ const OrderBy = () => {
2122
2223 return (
2324 < div className = { guidedGrid [ "gridItem" ] } >
24- < InputLabel > ORDER BY</ InputLabel >
25+ < InputLabel width = { LABEL_WIDTH } > ORDER BY</ InputLabel >
2526 < SqlInput
2627 className = { guidedGrid [ "noLeftBorderRadius" ] || "" }
2728 disabled = { disabled }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import useSearchStore from "../../../SearchState/index";
55import usePrestoSearchState from "../../../SearchState/Presto" ;
66import { SEARCH_UI_STATE } from "../../../SearchState/typings" ;
77import guidedGrid from "./index.module.css" ;
8+ import { LABEL_WIDTH } from "./typings" ;
89
910
1011/**
@@ -21,7 +22,7 @@ const Select = () => {
2122
2223 return (
2324 < div className = { guidedGrid [ "gridItem" ] } >
24- < InputLabel > SELECT</ InputLabel >
25+ < InputLabel width = { LABEL_WIDTH } > SELECT</ InputLabel >
2526 < SqlInput
2627 className = { guidedGrid [ "noLeftBorderRadius" ] || "" }
2728 disabled = { disabled }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import useSearchStore from "../../../SearchState/index";
55import usePrestoSearchState from "../../../SearchState/Presto" ;
66import { SEARCH_UI_STATE } from "../../../SearchState/typings" ;
77import guidedGrid from "./index.module.css" ;
8+ import { LABEL_WIDTH } from "./typings" ;
89
910
1011/**
@@ -21,7 +22,7 @@ const Where = () => {
2122
2223 return (
2324 < div className = { guidedGrid [ "gridItem" ] } >
24- < InputLabel > WHERE</ InputLabel >
25+ < InputLabel width = { LABEL_WIDTH } > WHERE</ InputLabel >
2526 < SqlInput
2627 className = { guidedGrid [ "noLeftBorderRadius" ] || "" }
2728 disabled = { disabled }
Original file line number Diff line number Diff line change 1+ /**
2+ * The fixed width for SQL clause labels.
3+ */
4+ const LABEL_WIDTH = "85px" ;
5+
6+ export { LABEL_WIDTH } ;
You can’t perform that action at this time.
0 commit comments