From ad44f34eabf8a758abd9821025e9da10768e0fd6 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Thu, 6 Mar 2025 14:05:15 +0530 Subject: [PATCH] Refactored with comments for better understanding. --- src/Components/Inputs/Select/index.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index 1cb35c19c..2aa979434 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -18,6 +18,7 @@ import "./index.css"; * @param {string} props.items.name - The display name of each item. * @param {function} props.onChange - The function to handle onChange event. * @param {object} props.sx - The custom styles object for MUI Select component. + * @param {number} props.maxWidth - Maximum width in pixels for the select component. Enables responsive text truncation. * @returns {JSX.Element} * * @example @@ -171,6 +172,10 @@ Select.propTypes = { onBlur: PropTypes.func, sx: PropTypes.object, labelControlSpacing: PropTypes.number, + /** + * Maximum width in pixels. Used to control text truncation and element width. + * Responsive breakpoints will be calculated as percentages of this value. + */ maxWidth: PropTypes.number, };